propershark / crossbar-router

Crossbar.io router to facilitate communication between app components.
0 stars 0 forks source link

AgencyRPCs and History should offer `clear` methods #3

Open faultyserver opened 8 years ago

faultyserver commented 8 years ago

When updates are pushed to shark, particularly ones that change data structures of events, it can take a long time (potentially forever) for those changes to propagate and update all existing data objects.

To remedy this, there should be RPCs that clear the caches these components hold, removing all stale data that may have been rendered structurally-incorrect by an update.

I would suggest something like agency.__clear for AgencyRPCSession, with the dunderscore indicating that this is not a normal rpc, and meta.__clear_history for HistorySession.

These procedures could additionally take arguments to give more granular control over what gets cleared by a single call.