tractorcow / silverstripe-dynamiccache

Simple on the fly caching of dynamic content for Silverstripe
39 stars 27 forks source link

Add session starting logic to checkCacheCommands. #13

Closed jyrkij closed 10 years ago

jyrkij commented 10 years ago

This fixes the case when cache is not flushed in live mode. The session hasn't been started yet so there's nothing in there. $hasPermission becomes false in that case.

tractorcow commented 10 years ago

Hey @jyrkij , there is already code to do this in the enabled function, but I agree it needs to be done earlier. would you mind to refactor both instances and put it somewhere earlier in the process? It could be in run just before either enabled or checkCacheCommands is called. Thank you. :)

Sorry for being absent, I need to give my repos some more attention.

tractorcow commented 10 years ago

Thanks @jyrkij , good job. :)