How to configure Media Cache to reload the cache from disk on server restart

By default Media Cache clears the cache on restart. To configure Media Cache to reload the cache on server restart, add these properties to the <Properties> container at the bottom of [install-dir]/conf/Server.xml:

<Property>
	<Name>mediaCacheOnStartReloadCache</Name>
	<Value>true</Value>
	<Type>Boolean</Type>
</Property>
<Property>
	<Name>mediaCacheOnStartReloadCacheVerifySource</Name>
	<Value>false</Value>
	<Type>Boolean</Type>
</Property>
  • mediaCacheOnStartReloadCache: When true, Media Cache will reload the cache on restart. When false, the cache will be cleared on restart.
     
  • mediaCacheOnStartReloadCacheVerifySource: When reloading the cache, if false, the reload will go faster for items sourced from HTTP source (item length will not be loaded from HTTP HEAD request and will rather be loaded from information in cache).
Note: The mediaCacheOnStartReloadCacheVerifySource property is new as of Media Cache 2.0.0 build1565.

 

If you're having problems or want to discuss this article, post in our forum.