Skip to content

Cache Expiry Pushing #17

Description

@PaymonK

Cache Expiry Pushing

ApiProxyGenerator: If the method takes no parameters, and defines PushExpireClientCache, then in the generated XXXApi class, in a static constructor, register a SignalR or Socket client tot he server to receive cache expiry notifications.

On the server side, we need to add a static AsyncEvent object on the appropriate entity type, which is used as the signal point.
public static AsyncEvent PeopleDataChanged;

In the Api controller class, in a static constructor, add:
PushExpireClientCache.For(nameof(All)).PushUpon(Person.PeopleDataChanged);

Internally that shall implement a mechanism to host the SignalR stuff. So that every time the event is raised, the remote client sockets receive a signal to expire their cache.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions