Open / close the cache only when is needed.