Re: End of session clean-up
| From: | Stuart Dallas | Date: | Sat, 03 Dec 2011 17:41:20 +0000 |
| Subject: | Re: End of session clean-up | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315926@lists.php.net to get a copy of this message | ||
On 3 Dec 2011, at 16:57, Andre Majorel wrote:
> Hello all. I need to purge old records from application tables
> when a session expires. How do I register a callback with the
> end-of session-garbage collection system ?
> session_set_save_handler() lets me override the native garbage
> collection, not *add* to it, as far as I can tell.
You would need to implement a complete session handler to add your own functionality into the GC.
However, the fact that you want to do this begs the question, why are you storing what sounds like
session data in application tables instead of storing them in the session?
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/