4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Lucifix on October 26, 2010, 12:44:50 PM
-
Does anyone know if it's possible to have different lifetime of cache for guests and registered users?
Looks like calling user_info in global.php file is too early...
-
You can try alter it at the end of sessions.php:
if ($user_info['user_level'] == GUEST)
{
$cache_lifetime = 3600*2; //twice as long then for members
}
-
I tried it and then in cache_utils.php added:
echo $cache_lifetime;
And it still show me 3600.
Maybe because file cache_utils.php is called in global.php.
And in index.php its like that:
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
Maybe I could remove from globals.php
include_once(ROOT_PATH.'includes/cache_utils.php');
And add at the end of session.php
if ($user_info['user_level'] == GUEST)
{
$cache_lifetime = 300; //twice as long then for members
}
include_once(ROOT_PATH.'includes/cache_utils.php');
-
It doesn't matter where it's being added, what matters is from where the function is being executed. Add that echo inside get_cache_file function instead.
-
Hi,
is it working?
Greetz X23
-
It doesn't matter where it's being added, what matters is from where the function is being executed. Add that echo inside get_cache_file function instead.
I can confirm, it's working! ;)
http://www.4homepages.de/forum/index.php?topic=28160.msg152200#msg152200
-
It doesn't matter where it's being added, what matters is from where the function is being executed. Add that echo inside get_cache_file function instead.
I can confirm, it's working! ;)
http://www.4homepages.de/forum/index.php?topic=28160.msg152200#msg152200
Hi,
just the lines to session.php...
that's all?
Greetz X23
-
It doesn't matter where it's being added, what matters is from where the function is being executed. Add that echo inside get_cache_file function instead.
I can confirm, it's working! ;)
http://www.4homepages.de/forum/index.php?topic=28160.msg152200#msg152200
Hi,
just the lines to session.php...
that's all?
Greetz X23
Correct ;)