Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2010-10-31 22:39:56

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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

feragnoli wrote:

not sure about the size of it.
but IF it is caching the images too that must be a few Mb for sure. is there a way out of this? filesystem caching?
(where is the plugin saving the cache by the way?)

This plugin parses txp code and stores it in DB. So, if you call some code, that was wrapped by aks_cache, and this code was cached previously by it, plugin will only make one query to DB and pull from it this chunk of code.

It doesn’t stores img’s in common sense – in most user cases it stores html code, once evaluted by Textpattern. If you need caching imgs you should tweak you server options. For example, search for “expire” option in .htaccess file.


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#32 2010-10-31 23:10:12

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

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

yes, I just saw that. the db table is set to mediumtext… would changing it to longtext affect the functioning..?


what was that again…?

Offline

#33 2010-11-01 17:17:43

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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

Maybe – you can try and post here results :)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#34 2010-11-04 13:39:48

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

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

hello, I did not get better result setting the column to longtext.
I think it is a problem with the MySQL server timing out.
maybe it would be possible to implement in the function a variable to set a different wait_timeout..?

see this: http://www.webyog.com/blog/2009/09/02/“mysql-server-has-gone-away”-part-2-session-timeout/

my block includes a certain amount of images from flickr, I guess that’s taking quite some time and extending the session


what was that again…?

Offline

#35 2010-11-11 13:11:38

etc
Developer
Registered: 2010-11-11
Posts: 3,989
Website

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

Nice plugin. I would just suggest that you check if( !(strpos($prefs['aks_cache_opt'],'dis_adm')===false) || !(strpos($prefs['aks_cache_opt'],'dis_users')===false) ) before calling $prr=is_logged_in(); to spare one query.

Offline

#36 2010-11-17 12:03:41

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

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

I do have quite a lot of html blocks that require caching and I cannot simply put all html blocks in one cache-block. I have noticed that the overall time for SQL queries is quite high so I was hoping there could be an option to store cached blocks on the file system directly rather than in the database.

Is it possible to set aks_cache so it uses a directory to write cache files to instead of using the MySQL database?


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#37 2011-11-27 15:50:24

mericson
Member
Registered: 2004-05-24
Posts: 137
Website

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

How does aks_cache deal with conditionals in the content? <txp:if_section… <txp:if_search…. etc. ?

Do I need to avoid caching any portions of my textpattern markup if it contains conditional ? I suppose it is fine for some conditionals, because the conditional logic is deterministic based on the URL.

Offline

#38 2011-11-27 15:52:00

mericson
Member
Registered: 2004-05-24
Posts: 137
Website

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

I agree, seems like file-system cache would be a nice enhancement. For me, the reason I want to cache is that my bottleneck can be a shared MySQL instance. If the performance of the database degrades dramatically, I won’t be as impacted if I have file caching !

stephan wrote:

Is it possible to set aks_cache so it uses a directory to write cache files to instead of using the MySQL database?

Last edited by mericson (2011-11-27 16:28:14)

Offline

#39 2011-11-28 08:21:22

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

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

The keywords to look for are ‘full page caching’. There is a plug-in and a feature request too.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#40 2011-11-28 08:42:15

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

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

Hi Markus,

full page caching is a different approach. It seems only the orpahaned zem_cache would be able to do partial page caching to file (what I would look for rather than caching a full page), asy_jpcache only caches the full page indeed.

Now my use case is to cache the database intense tag cloud in a file, also the last comments part in the side bar, so now full pages but only partial blocks, just like aks_cache does – but saved in a file instead of the database table.

Can we upvote the existing feature request? ;-)


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

Board footer

Powered by FluxBB