Try our conversational search powered by Generative AI!

Confusing behaviour of IObjectInstanceCache ReadThrough method

Found in

EPiServer.CMS.Core 10.0.1

Fixed in

EPiServer.CMS.Core 10.2.0

(Or a related package)

Created

Oct 26, 2016

Updated

Dec 05, 2016

Area

CMS Core

State

Closed, Fixed and tested


Description

The documentation states that it is possible to send NULL as cache evication policy to get the default policy :

The function to invoke for determining the cache eviction policy in case a new value was retrieved. It can be null in which case a default policy is used.

But when sending NULL, nothing is cached. The documentation only states that returning a NULL value causes nothing to be cached. We should fix this for compatibility. Maybe adding an overload that does not take CacheEvictionPolicy would clarify that fact that you should not send NULL or return NULL if you just want the default behavior.