JosephSilber / page-cache

Caches responses as static files on disk for lightning fast page loads.
MIT License
1.21k stars 118 forks source link

Disabling or dev mode #71

Closed warmwhisky closed 3 years ago

warmwhisky commented 3 years ago

Hey, do you have any advice on a way to pypass when in dev or local?

rajakhoury commented 3 years ago

See this example What you could do is add a check e.g if ! config('app.debug') then return false. Make sure to clear all cahed pages so the request can hit your app.

JosephSilber commented 3 years ago

What @rajakhoury said.

Also note: even without disabling it, you still won't be served the cached files unless you update your Apache/nginx settings locally.

warmwhisky commented 3 years ago

@rajakhoury @JosephSilber Thanks for the pointers. I ended up removing the entires from Apache htaccess for local then used gitignore and removed it from the git index.