Hi,
is it possible to have a different cache time for index and /category/All/date/1/ compared to all the rest of the files?
What I mean is, I would like to have the index and the first page of new videos rebuilding faster, more dynamic than the whole rest of the site.
Cache time
Re: Cache time
Yes, you can define CACHE_TIME in common.php
for example
if (your condition) {
define('CACHE_TIME', 500);
} elseif (another condition) {
define('CACHE_TIME', 1000);
}
and so on
for example
if (your condition) {
define('CACHE_TIME', 500);
} elseif (another condition) {
define('CACHE_TIME', 1000);
}
and so on
Don't forget to run script update
Re: Cache time
That sounds good.
I am not a programmer. Can you explain a little more what I have to do?
How do I define the conditions?
I am not a programmer. Can you explain a little more what I have to do?
How do I define the conditions?
Re: Cache time
Lets say I want to have the index cache time at 60, and this page /category/All/date/1/ at 60
and everything else at 900?
and everything else at 900?
Re: Cache time
if ($_SERVER['REQUEST_URI'] == '/') {
define('CACHE_TIME', 60);
} elseif ($_GET['order'] == 'date') {
define('CACHE_TIME', 60);
} else {
define('CACHE_TIME', 900);
}
This is an example, I didn't test it
define('CACHE_TIME', 60);
} elseif ($_GET['order'] == 'date') {
define('CACHE_TIME', 60);
} else {
define('CACHE_TIME', 900);
}
This is an example, I didn't test it
Don't forget to run script update







