HTTP Cache
Created 5 years ago by ryanthompson

Something I would like to include in a (now likely) v3.6 is this:

We would need to do it there given that we already handle some middleware and HTTP kernel ourselves. Otherwise nothing breaks but the cache does not come into play.

I feel like this would need an interface of some kind to control? Ideas on controlling this in general.. maybe a filtering system instead of per page/post or the module itself.

I see a system to allow you do do like:

/posts -> 60 minute ttl /posts/* -> 60 minute ttl

/ -> 120 minute ttl

We would need to support ESI and also we would need to come up with a way to dynamically purge cache like model cache collections. Where posts are updated then purge post related URLs.

Any thoughts on how to best handle this? Cachable interface on streams? Idk. Need ideas!

ryanthompson  —  5 years ago Best Answer

This is in v3.6 - closed.

ryanthompson  —  5 years ago

A default value in settings could work - then overridden per module that uses it out of the box? Then per entry we would still need a way to disable it (non-exact URI pages would be tough to purge).

ryanthompson  —  5 years ago

WP Super Cache and Fastest cache seem extremely popular. Maybe I'll wrap those up in here. Take the best of both options / features and smash em together. I feel like needs to go in core because of 1.) how we have to implement it and 2.) tighter internal support for custom addons and such.

frednwt  —  5 years ago

I already implemented this one. The problem we will have is: any dynamic area, need ESI or will not be updated.

Typically for Pyro:

  • Token and Form URL
  • Block Areas

Anyway, it should be easily disabled on any routes, it cannot be used for eCommerce for example.

Something nice, should be a cache-module. And inside you can disable / enable cache for all detected routes (need to fix first). So instead of controlling the cache per module, it can be controller per application.

ryanthompson  —  5 years ago

I'm about to release a 3.6-alpha that includes this as well as docs on customizing timeout and exclusion rules from settings. Works great.

ryanthompson  —  5 years ago

@frednwt I got you on that pages update.

ryanthompson  —  5 years ago Best Answer

This is in v3.6 - closed.