Skip to content

Cached Queries #3

Closed
wants to merge 2 commits into from

2 participants

@mbrevoort

I added a cache.query function to the client and simple caching for each roleVer that was previously retrieved. The server fires invalidateCache on the clients after allocate, assume or free. To reduce the chattiness of the invalidateCache calls to clients that don't care, caching could be turned on optionally when the client connects. If disabled, calls to cache.query would just pass through to query and the server wouldn't call invalidateCache for that client remote. I wanted to see what you thought of the approach first before going that far though.

@substack
Owner

I'm not sure if this is as necessary now since seaport@0.7.0 has .subscribe() so whipping up a cache shouldn't be too hard just by listening on the event stream. This might vary depending on what functionality you need however but for the use case of an http proxy/router it should work pretty well.

@mbrevoort

yeah, subscriptions are working fine, potentially a bit chatty but nice and simple

@mbrevoort mbrevoort closed this Jul 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.