tractorcow / silverstripe-dynamiccache

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

Check for Controller #48

Closed Firesphere closed 7 years ago

Firesphere commented 7 years ago

Regarding the Controller check:

This module will allow individual pages to opt-out of caching by specifying certain headers, and will ignore caching on ajax pages or direct requests to controllers (including form submissions) by checking for any url-segments that start with an uppercase letter.

Wouldn't doing something like !$pageThing instanceof Page?

tractorcow commented 7 years ago

Oh, no, it never has access to the actual instances... only the url strings. :) This module only operates between the framework and the server; It doesn't have much access to the inner workings on request routing.

Firesphere commented 7 years ago

Fair enough :D I am pondering of a way to get it more reliable though. I may or may not come back to bug you :P