Wednesday, 15 August 2012

Is there a way to run custom code on Azure Cache expiration? (where last cached value is accessible) -



Is there a way to run custom code on Azure Cache expiration? (where last cached value is accessible) -

what mean kind of event or callback called when cached value expiring. supposedly callback should given currenlty cached value, example, store somewhere else apart caching.

to find such way, have reviewed notifications option, applicable explicit actions cache adding or removing, whereas expiration kind of thing occurs implicitly. found out none of these callbacks not called many minutes after cache value has expired , has become null, while called within polling interval if phone call datacache.remove explicitly (wrong, see update below).

i find behavior unusual asp.net has such callback. can find explanation how utilize here on so.

also, tried datacache events. writtent in msdn literally

this api supports .net framework infrastructure , not intended used straight code.

nevertheless created handler these event see if can test args cacheoperationstartedeventargs.operationtype == cacheoperationtype.clearcache seemed in vain.

at moment, started think workarounds of issue of lack of required callback. suggestions how implement them welcome too.

update. after more attentive , patient testing found out notification datacacheoperations.replaceitem sent after expiration. regrettably, did not find way value cached before expiration had occurred.

azure azure-caching

No comments:

Post a Comment