What's the best way to clear session files for a cherrypy app on RHEL 6 without clearing active sessions? -
what's best way clear session files cherrypy app on rhel 6.3 without clearing active sessions? can run cron job clears files last modified greater 15 days old?
i've tried executing command...
find /path/to/files* -mtime +5 -exec rm {} \;
from this site
but doesn't remove files modified @ least 5 days ago. appreciated.
the sessions in cherrypy expired , removed given parameters of session:
- timeout: specify minutes of inactivity mark expired.
- clean_freq: specify frequency of session cleaning in minutes
for example dispatch thread delete files each 3 minutes , timeout of 5 minutes configure session this:
{'tools.sessions.timeout': 5, 'tools.sessions.clean_freq': 3}
for more information on properties of session check out the official documentation.
but if looking execute cleaning cronjob why not specify +4 instead of +5 include 5 on date range, like:
find /path/to/files* -mtime +4 -exec rm {} \;
Comments
Post a Comment