mosz
03-31-2009, 03:09 PM
Hello
I want to write cache plugin
smth like that:
if (user not login) {
$cache_id = $_SERVER['REQUEST_URI'];
if (cache_exist($cache_id) {
echo get_cache($cache_id);
die();
}
else {
generate_cache($cache_id);
}
}
my problem is how to ganerate cache for request_uri ?
i want to have all content in one varible
smth like:
$cache = file_get_contents ($domain.$_SERVER['REQUEST_URI']);
but upper example make double site load.. so its not good
edit:
i want to grab content of:
index.php
forumdisplay.php
showthread.php
showpost.php
any idea ?
--------------- Added 1238581933 at 1238581933 ---------------
refresh
anybody know the answer ?
its very important for me :)
or maybe it can to show all varibles and arrays defined in php ?
I want to write cache plugin
smth like that:
if (user not login) {
$cache_id = $_SERVER['REQUEST_URI'];
if (cache_exist($cache_id) {
echo get_cache($cache_id);
die();
}
else {
generate_cache($cache_id);
}
}
my problem is how to ganerate cache for request_uri ?
i want to have all content in one varible
smth like:
$cache = file_get_contents ($domain.$_SERVER['REQUEST_URI']);
but upper example make double site load.. so its not good
edit:
i want to grab content of:
index.php
forumdisplay.php
showthread.php
showpost.php
any idea ?
--------------- Added 1238581933 at 1238581933 ---------------
refresh
anybody know the answer ?
its very important for me :)
or maybe it can to show all varibles and arrays defined in php ?