2

With CKAN, a new Beaker session is saved with each page load, AJAX request, and Flash message popup.

Is it really necessary to save so many sessions. Forgive my ignorance but I don't think I fully understand the benefit especially as it steadily fills the cache directory with many small files.

Is there any downside to periodically clearing out the directory?

Dan
  • 21
  • 1

1 Answers1

1

CKAN does not manage the beaker session files, you can find more info on this related issue https://github.com/ckan/ckan/issues/5294, where sessions are saved on db rather than on filesystem.

I added a line like this in my crontab file, to remove session files older than 24 hours:

0  * * * *   ckan    find /tmp/<YOUR_CKAN_NAME>/sessions/ -mmin +1440 -type f -print -exec rm {} \;
etj
  • 11
  • 1
  • I also use a cron to remove my session files, but I'm more curious as to what the point is in creating so many session files in the first place. Thanks for the link though. I think I'd rather to the db approach rather than using files. – Dan Sep 24 '20 at 13:29