Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-06-19 07:18:20

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Cache system into the Core

Today, most of publishing platforms integrate a cache system into their Core.

Devs, did you think about this feature? With the ability to choose which section (in the Sections tab) add to the process.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2015-06-19 08:22:43

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Cache system into the Core

+1 for this, obviously!

Offline

#3 2015-10-21 00:04:35

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: Cache system into the Core

+1000000

Offline

#4 2015-10-21 03:44:58

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Cache system into the Core

Pat64 wrote #291676:

With the ability to choose which section (in the Sections tab) add to the process.

Cacheability must be a property not only of sections but also of individual pages, forms and articles. We would also need to specify a time granularity for article timestamps (otherwise articles would have to be re-cached every second).

Offline

#5 2015-10-21 08:22:13

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: Cache system into the Core

wet wrote #296065:

Cacheability must be a property not only of sections but also of individual pages, forms and articles. We would also need to specify a time granularity for article timestamps (otherwise articles would have to be re-cached every second).

;)

Please, Robert: keep this in your to do list.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#6 2015-10-21 08:39:06

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Cache system into the Core

Robert, if this is of interest, Jukka did a bit of work on some caching stuff:

rah_cache

rah_cache_minify

Offline

#7 2015-10-21 09:06:48

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Cache system into the Core

What would happen with the content parsed through rand() for articles, images, links etc?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Online

#8 2015-10-21 09:52:14

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Cache system into the Core

philwareham wrote #296072:

Robert, if this is of interest, Jukka did a bit of work on some caching stuff

Didn’t know about that. But there’s more:

I believe asy_jpcache is a working solution for full-page caching with a flat-file or MySQL backend.

At first glance the support thread does not mention any special problems which aren’t inherent to the concept of caching per se so still it might be a working plugin after all those years.

asy_jpcache has cache flushing and works in concert with zem_contact’s spam protection.

We have even added a feature to integrate it (and similar solutions) into core.

I’d rather solve any issues with that plugin than re-invent a similar wheel in core.

The real difficulties I see are if one needs finer-granular caches, which varying requirements and hard-to-generalize cache validation rules. Whenever I encountered such requirements I employed aks_cache.

So… Is this thread’s general topic “This must be a feature in core rather than a few plugins!!!11!” or about “Existing plugins do not cut the cake as a general-purpose caching solution!!!11!!11”?

Offline

#9 2015-10-21 09:56:18

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Cache system into the Core

colak wrote #296075:

What would happen with the content parsed through rand() for articles, images, links etc?

This is the 1-million-$ question ;)

See also:

  • Time granularity for posted and expiry timestamps
  • cache invalidation rules when some content is updated
  • comments
  • captchas on contact forms
  • and many similar issues where a full-page cache does not render dynamic/time-dependent parts of the page in their current state but some older, potentially stale version of it (which is the point of caching).

Offline

#10 2015-10-21 10:07:09

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Cache system into the Core

If plugins handle it all satisfactorily, then I’m happy to leave it at that. Thanks Robert.

Offline

#11 2015-10-21 10:31:43

etc
Developer
Registered: 2010-11-11
Posts: 5,192
Website GitHub

Re: Cache system into the Core

I guess, the question is “is there a one cache automagically fits them all” solution to put in the core, and the answer is “No”, I’m afraid. Letting visitors fill the cache is hazardous: what happens if some bot requests for ?pg=1,2,...,1000000000, which are all valid and cacheable requests? You will quickly reach cache size limits, right? So, the cache must be controlled admin-side, and I wouldn’t mind if aks_cache were in the core, but it would be the site admin’s work to decide what should be cached.

Stef has actually introduced few callbacks in 4.6 intended to help with aks_cache, but I don’t remember where is this thread (edit: it’s here).

Last edited by etc (2015-10-21 15:40:20)

Offline

#12 2015-10-21 10:58:26

etc
Developer
Registered: 2010-11-11
Posts: 5,192
Website GitHub

Re: Cache system into the Core

When toying with WP, I have tried a very cool cache plugin: it not only saves pages as plain HTML, but also rewrites .htaccess to serve these pages instead of PHP. The result would be blazingly fast, if only it worked… but wouldn’t fit a highly dynamic site anyway.

Offline

Board footer

Powered by FluxBB