We use appfabric as the second level cache for the NHibernate asp.net application, which includes the client website and the admin website. They are both connected to the same cache, so when the administrator updates something, the client site is updated.
It seems to be working fine - we have CacheCLuster on a separate server, and everything is fine, but we want the local cache to get better performance, however it seems to work.
We turned it on like that ...
bool UseLocalCache = int LocalCacheObjectCount = int.MaxValue; TimeSpan LocalCacheDefaultTimeout = TimeSpan.FromMinutes(3); DataCacheLocalCacheInvalidationPolicy LocalCacheInvalidationPolicy = DataCacheLocalCacheInvalidationPolicy.TimeoutBased; if (UseLocalCache) { configuration.LocalCacheProperties = new DataCacheLocalCacheProperties( LocalCacheObjectCount, LocalCacheDefaultTimeout, LocalCacheInvalidationPolicy );
First, we tried to use a timeout cancellation policy (3 minutes), and our application felt that it was running faster. HOWEVER, we noticed that if we changed something on the admin site, it was immediately updated on the site. Since we use timeouts without notifications, this demonstrates that the local cache is not requested (or is, but always absent).
Cache .GetType (). The name returns "LocalCache" - so the factory made a local cache.
Running Get-Cache-Statistics MyCache on PS in my dev environment (an asp.net application running locally with vs2008, a cache cluster running on a separate w2k8 machine) shows several requests. However, in a production environment, the number of requests increases dramatically.
We tried to execute the method here to pass the cache traffic of the cliebt server ... http://blogs.msdn.com/b/appfabriccat/archive/2010/09/20/appfabric-cache-peeking-into-client-amp- server-wcf-communication.aspx , but there was nothing in the log file except the initial header in it - that is, not a login.
I can not find anything in SO or Google.
Did we do something wrong? We have an AppFabric screw installation - we installed it through the WebPlatform Installer - I think? (note: the IIS box that works with ASp.net is not in the cluster - it's just a client).
Any ideas received with thanks!