Telligent Caching Not Updating - Multiple Web Servers

Telligent Caching Not Updating - Multiple Web Servers

This question is not answered

Hi,

We have implemented some custom plugins in TC6.1 that utilise the Telligent cache to store and retrieve objects from memory. It works fine but when testing under a load-balanced environment it doesn't seem to refresh the cache on both web servers. I understand we could implement AppFabric to handle a distributed cache. However what I don't understand is that the rest of Telligent's out of the box objects seem to work fine across both web servers. E.g If I update my user profile or create a forum post then this display fine.

Therefore why do my custom objects not update in the cache in the same way? We are using code similar to below:

Telligent.Evolution.Extensibility.Caching.Version1.CacheService.Remove(myContentCacheKey, CacheScope.All);

                   Telligent.Evolution.Extensibility.Caching.Version1.CacheService.Put(myContentCacheKey, content, CacheScope.All, null, TimeSpan.FromMinutes(_minutesToCache));

Is their a configuration setting I need to make in my caching.config file or something?

We have an application server that we use for SOLR and the filestorage. Is it possible to configure the cache to be stored here instead and shared?

Thanks

Adam

All Replies
  • The oob cache is the in http memory cache that is not shared accross servers if you want to have caching shared you can use app fabric but there is a performance hit and you have to be carefull that your object can be serialized correctly.

  • How long are you caching for?  Even with app fabric installed, there is no expiring of cache between web servers.  Even when app fabric is installed, each web server still maintains it's own cache and only uses App Fabric as a second level cache (assuming the object's cached in both the Process & Distributed scopes).

    We do however use a couple of tricks when caching objects which tends to hide most of the side effects of inconsistent caches:

    * We don't cache objects for that long - rarely more than a minute or two.  This limits the amount of time for which the web server caches can be inconsistent.

    * We recommend all customers enabled sticky sessions on their load balancers.  This way each visitors always visits the same server, so should never see odd side effects due to seeing mismatched caches between the two web servers.

    Note, as Robert mentioned, if you're caching something in the Distributed / All context, your object *Must* be XML Serializable.  Otherwise you'll encounter errors if app fabric is used.