-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Description
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.
Reactions are currently unavailable