I have a Cache WorkerRole in Azure. I was planning to override the OnStart behavior of the role to pre-fill my cache and to use my own scheduler to fill the cache from within the worker role itself. This isn't scalable, I know this, but I don't need it to be.
So, my question is, is this even possible? I know I can override the OnStart, but how would I access the cache? From my other roles I would configure the web.config and just do:
DataCacheFactory cacheFactory = new DataCacheFactory();
DataCache cache = cacheFactory.GetDefaultCache();
But would changing the Web.config create any issues? Would I do this?
<localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" />
Or would I do:
<autoDiscover isEnabled="true" identifier="CacheRoleName" />
Anyone done this before and have any advice on how to set this up?