Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#76 2016-02-06 13:10:43

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,205
Website GitHub

Re: aks_cache: Partial caching web pages. SpeedUp your site!

Would it be possible to add a more fine-grained way of optionally controlling how the cache is cleared? Perhaps on a per-article basis rather than blanket last_mod making everything update?

The situation is a site with thousands of articles that is updated regularly, often every few days. The old articles remain unchanged and the cache for those could persist for a long time without needing to be cleared.
Or is there a better alternative way of doing this?

BTW: what has changed with the most recent version of aks_cache?


TXP Builders – finely-crafted code, design and txp

Offline

#77 2017-06-12 13:03:44

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

Re: aks_cache: Partial caching web pages. SpeedUp your site!

Does this work with Textpattern 4.7dev? Can’t seem to get it working on my local site test.

Offline

#78 2017-06-12 18:34:30

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355

Re: aks_cache: Partial caching web pages. SpeedUp your site!

philwareham wrote #305925:

Does this work with Textpattern 4.7dev? Can’t seem to get it working on my local site test.

Oops, does not work anymore. ;-)
Thanks for the report, I will fix it soon.


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#79 2017-06-12 20:25:52

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355

Re: aks_cache: Partial caching web pages. SpeedUp your site!

aks_cache 0.3d

Changes:

  • Textpattern 4.7dev Fix

aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#80 2017-12-01 16:58:11

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

Re: aks_cache: Partial caching web pages. SpeedUp your site!

I’ve tried to put <txp:aks_cache id='article-<txp:article_id>'> around the article tag, but I get always the same article. Seems like the pattern does not recognize the <txp:article_id> modifier. In fact in the cache list I have article- as the corrisponding handler. So no matter what I click on, I get always the same article. I tried also to put <txp:aks_cache> without id, since it should get the URI as identity, but I get as well the same article.
Thanks for any suggestion

Offline

#81 2017-12-01 16:59:32

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

Re: aks_cache: Partial caching web pages. SpeedUp your site!

Is your <txp:article_id> closed, i.e. <txp:article_id />?

Offline

#82 2017-12-01 17:21:23

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

Re: aks_cache: Partial caching web pages. SpeedUp your site!

Damn it was article-id >:~)

Offline

#83 2019-02-12 23:43:53

gilibaus
Member
From: Italy
Registered: 2013-08-14
Posts: 92
Website

Re: aks_cache: Partial caching web pages. SpeedUp your site!

I have a website where every week I publish a podcast episode in the form of an article containing some text + an audio player. The old episodes (approximately 100 and counting) remain unchanged. Is it a suitable scenario for aks_cache? Thanks.

Last edited by gilibaus (2019-02-13 08:29:07)

Offline

#84 2019-02-13 16:31:27

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,205
Website GitHub

Re: aks_cache: Partial caching web pages. SpeedUp your site!

I’m not an expert on this, so maybe someone more knowledgeable can give you a more qualified answer.

However, as I understand it, caching plugins help save pre-rendered page content that doesn’t change much. They save Textpattern going back to the database and processing a page, so their main benefit is in speeding up pages with complex content and lots of database queries. Pages with complex menus or long categorised lists compiled from many posts probably benefit most.

I don’t think it has any benefit for serving files such as audio files, so it’s unlikely to speed that up.

aks_cache is good, but if you make one change to the site, the entire cache is discarded and rebuilt in subsequent site visits. etc_cache is better in this respect in that you can set it only to discard the relevant bit of the cache. I don’t think it works with older versions of textpattern, though.

One thing you need to watch out for when using a caching plugin is to name your cache blocks sensibly for every possible view of a page, e.g. if you can filter your list of articles by category, make sure a separate cache block is created for each category view or you may find the cache blocks your filter from working.


TXP Builders – finely-crafted code, design and txp

Offline

#85 2019-03-10 14:51:51

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: aks_cache: Partial caching web pages. SpeedUp your site!

In textpattern 4.7.3 the design breaks a little bit the options screen of aks_cache – td elements have “vertical-align:middle” associated. With a lot of cached elements the options form is somewhere below and one has to scroll down. A small workaround could be to change

echo <<<EOF
<style type="text/css">
#aks-list td{

to

echo <<<EOF
<style type="text/css">
td{vertical-align:top}
#aks-list td{

Offline

Board footer

Powered by FluxBB