[Cgi-session-user] Feature request: expiring parameters based on mtime.
Brought to you by:
sherzodr
From: Dmitri T. <dti...@vo...> - 2006-07-11 18:50:51
|
Dear Mark, Sherzod, and the List: I would like to know what you think about the following API enhancement: I would like to be able to expire certain parameters based on mtime, not atime. Current 'expire' method only works with access time. Reason: I have a DB-driven web site. In order to improve performance, I store some query results in session variables. But those I'd like to refresh from time to time. To achieve this, I do things like $session->param('abc', $value); $session->param('abc_mtime', time); # And later: if ($session->param('abc_mtime') + $interval < time) { # expired. } I would love to be able to say $session->param('abc', $value); $session->expire_mtime('abc', '2m'); # or something like that and be done with it. Questions: a) what do you think? b) if I implement it, will you accept the patch? c) if the answer to (b) is yes, what kind of method name would you like? Sincerely, - Dmitri. |