pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
306 stars 445 forks source link

Cleanup Laravel cache #8922

Closed jonasraoni closed 1 year ago

jonasraoni commented 1 year ago

Describe the bug The Laravel cache is currently being stored at the folder cache/opcache, and it needs to be cleared, at least on these two key places:

To Reproduce

  1. Access the Administration
  2. Click on Delete Data Caches
  3. Check if there are old files at the cache/opcache folder

What application are you using? OJS 3.4.0rc2

touhidurabir commented 1 year ago

@asmecher PRs to review pkp-lib --> https://github.com/pkp/pkp-lib/pull/9010 ojs --> https://github.com/pkp/ojs/pull/3912

we need to remove the .gitignore file form cache\opcache folder as that folder is auto generated on new cache generation . Also it's not present for OMP and OPS . BTW the main reason is that laravel cache clear also removed the .gitignore file . An issue has been registered for this check here and the fix has been applied but that's only for Laravel 10.x as our version for 3.4.0 RC3 is locked to Laravel 9.x .

It's also needed to prune stale/expired cache from times to times (job).

This will require some changes into our current cache manager and also require custom override to larvael cache handing so may be better to have this set for a future version .

jonasraoni commented 1 year ago

@touhidurabir I think it's ok to postpone the cleanup to 3.4.x-y, the current cache manager will be dropped soon, so it's better to avoid writing/tinkering with something that will be erased.

But it's not something that should be forgotten for too long, some pieces of the software might have a snowball nature (e.g. the creation of unified locale files).

asmecher commented 1 year ago

Thanks, @touhidurabir and @jonasraoni -- and agreed, the rest should be dealt with later as part of https://github.com/pkp/pkp-lib/issues/7111.

jonasraoni commented 1 year ago

Ok, I've updated the description and I'll drop a note on the other issue.