General informations about JotCache extension

TOPIC: cronjob recache need some help.

cronjob recache need some help. 08 Jan 2016 11:50 #1579

Hello,

I'm using your plugin and I want to recache all my expired pages with a cronjob. But there is a problem. my script doesn't seem to finish and timeout after about 10-20 pages. I read some post and saw that it might be max_execution time. I looked and saw it was on 120. After i contacted my host company they said they couldn't change that setting.

So my solution was letting the script only recache 10 expired pages at the time. I tried changing this (i got this from another post on this forum):
original code :

$query = $db->getQuery(true);
$query->clear();
$query->update($db->quoteName('#__jotcache'))
->set('recache=1');

new code :

$query = $db->getQuery(true);
$query->clear();
$query->update($db->quoteName('#__jotcache'))
->set('recache=1')->order('`ftime` DESC LIMIT 5');

In the original post the end number was 100 but i changed it to 5 to see if it only cached 5. It didn't can be i did something not related to it at all. But i don't know how to achieve this. Please help!

Thanks in advance.

Joomla version : 3.4
JotCache version : 5.2.1
site template:
system plugins :
The administrator has disabled public write access.

cronjob recache need some help. 09 Jan 2016 08:23 #1580

With
order('`ftime` DESC LIMIT 5');
you recache (when the rest of the script is correct) only first 5 newest cached pages. You need to change order for ASC to recache oldiest cached pages as
order('`ftime` ASC LIMIT 5');
The administrator has disabled public write access.

cronjob recache need some help. 11 Jan 2016 10:31 #1581

Hello,

First of all thanks for the code and fast reply.
We tested it but we still see 10-20 pages being cached. We know this for sure because in our visitor list we see our own ip and jotcache in the user agent. Here is an example:
/index.php/keuze-voor-producten/voedsel/zoetgehalte-brix/f/category
109.73.229.232
1/11/16 1:30 AM
Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00 jotcache \x5Cr\x5Cn

I am quite sure the code has to limit it to 5 pages and no more. So i am very surprised by this result.
This is what my log file says:
2016-01-11 01:30:01 Starting recache run
2016-01-11 01:30:01 .loaded 3 jotcache plugin(s)
2016-01-11 01:30:01 ..registering `crawler` plugin
2016-01-11 01:30:01 ..registering `crawlerext` plugin
2016-01-11 01:30:01 ..registering `recache` plugin
2016-01-11 01:30:01 ...triggering `onJotcacheRecache` event

So unfortunately this didn't work for us. Any idea why this didn't work or do you have any other solution to my problem?

Thanks in advance!
The administrator has disabled public write access.
Time to create page: 0.240 seconds
We have 34 guests and no members online
Copyright © 2015 JotComponents
We have 34 guests and no members online
Copyright © 2017 JotComponents