ancient cache notes

alex black <[email protected]> Wed, 23 Mar 2005 15:06:33 -0800
Newsgroups gmane.comp.lib.binarycloud.devel
Message-ID <[email protected]>
hi all,

just found these from R2:

............

perhaps as part of jcm's proposal we can put in client caching 
parameters per URI :)

_a





This took me a while to figure out :
I wanted to use session management for my pages where the data changes 
all
the time, and i want people to be able to print things out. This causes 
a
problem, because by default the session management cache_limiter (in
php.ini) is set to nocache, which makes it impossible to print or use 
the
back button. If i change it to public or private, it makes it so i can
print, but when the data changes, the page does not display it, it 
displays
the cached version - this is a headache. Through trail and error, i
figured out that you can leave the cache setting alone (up to the 
browser)
by making the setting

session.cache_limiter = ; (leaving it blank)

instead of one of (nocache, public, private)
So if you want the cache to act like it did before you added the session
management, just blank the setting out.

---------

So, we were having problems with the default headers that php sends, so 
I
patched session.c to add a <none> argument to session.cache-limiter
-- but andrei points out that you can have the same effect by doing one 
of
the following:
in php.ini, you can set session.cache_limiter = ""; in your code
you can: session_cache_limiter(""). Good luck.

-----------


To get more secure session IDs, here is what I use on GNU/linux :

ini_alter("session.cookie_lifetime", "86400");
ini_alter("session.entropy_file","/dev/urandom");
ini_alter("session.entropy_length", "512");


-----------

session.save_handler = files
session.save_path = BCPATH./user/sess/

:)

-- 
alex black, founder
the turing studio, inc.

510.666.0074
[email protected]
http://www.turingstudio.com

2600 10th street, suite 635
berkeley, ca 94710

_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev