3

Our web application has caching enabled in a pretty standard way, with the LRUPolicy configured as follows:

    <ObjectCache Enabled="true">
        <Policy Type="LRU" Class="com.tridion.cache.LRUPolicy">
            <Param Name="Size" Value="10000" />
            <Param Name="MemSize" Value="256m" />
        </Policy>
        ...
    </ObjectCache>

For some reason however, the log tells me that the:

17:38:46.642 [WebContainer : 0] INFO  com.tridion.cache.CacheFactory - No policy configured, creating a cache with an empty policy.

In other words: the LRUPolicy is somehow not loaded, and the EmptyPolicy is used instead. As a result, the MemSize and Size parameters are ignored (see Cache list size seems limited to 128 items). I understand that this is the normal behaviour of the EmptyPolicy.

What could be the reason for the LRUPolicy not being loaded? I've checked - and ruled out - the following already:

  • Incorrect/malformed cd_storage_conf.xml (double-checked it, it's fine)
  • The LRUPolicy class could be missing (checked it, it's in the cd_cache.jar, alongside the EmptyPolicy which is loaded)

What am I missing here?

  • 2
    Quirijn in the caching setups that I've performed I observe that the system always starts with empty policy but immediately loads the LRU policy after. Can you see if you log files mention anything at all about the LRU policy? Example logs: 2012-01-27 10:28:19,863 INFO CacheFactory - No policy configured, creating a cache with an empty policy. 2012-01-27 10:28:19,867 INFO LRUPolicy - Creating LRU Policy for region 2012-01-27 10:28:19,867 DEBUG LRUPolicy - Configuring LRU Policy for region 2012-01-27 10:28:19,868 DEBUG LRUPolicy - List size of global LRU Policy = 0 – Kunal Jun 17 '16 at 6:40
  • I haven't seen any mention of the LRUPolicy. I will double-check this. – Quirijn Jun 17 '16 at 6:51
  • 1
    @KunalShetye I think that is actually a valid answer, so I would suggest you delete your comment and post it as an answer. It might not be the solution for Quirijn, but certainly counts as an answer in my book ;). – Bart Koopman Jun 17 '16 at 7:22
5

Quirijn in the caching setups that I've performed I observe that the system always starts with empty policy but immediately loads the LRU policy after.

Can you see if you log files mention anything at all about the LRU policy?

Example logs:

2012-01-27 10:28:19,863 INFO CacheFactory - No policy configured, creating a cache with an empty policy.

2012-01-27 10:28:19,867 INFO LRUPolicy - Creating LRU Policy for region

2012-01-27 10:28:19,867 DEBUG LRUPolicy - Configuring LRU Policy for region

2012-01-27 10:28:19,868 DEBUG LRUPolicy - List size of global LRU Policy = 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.