Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maint::Cache::Delete does not honor --keeptype in the Redis case #311

Closed
bschmalhofer opened this issue Aug 5, 2020 · 3 comments
Closed
Labels
bug Something isn't working as intended
Milestone

Comments

@bschmalhofer
Copy link
Contributor

I did:

otobo@5af6091324ca:~$ bin/otobo.Console.pl Maint::Cache::Delete
Deleting cache...
Done.
otobo@5af6091324ca:~$ redis-cli  -h redis
redis:6379> keys *

and got 38 keys. I expected that all keys were removed.

@bschmalhofer bschmalhofer added the bug Something isn't working as intended label Aug 5, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.1 milestone Aug 5, 2020
@bschmalhofer bschmalhofer modified the milestones: OTOBO 10.1, OTOBO 10.0.3 Aug 19, 2020
@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Aug 19, 2020

Some investigation showed that Maint::Cache::Delete does indeed work. The found keys were most likely added again to the deleted cache. This is likely due to the actions of the OTOBO Daemon or maybe klicks in the web app.

However some strangeness concerning the option --keep-type were noted.

no --keep-type is passed

flushdb is not called. Instead all keys are deleted seperately. This is because an reference to an empty array is not logically false.

one or more --keep-type options are passed

These types are still deleted as the relevant regex is broken.

bschmalhofer added a commit that referenced this issue Aug 19, 2020
more verbose names for variable names
Explicitily handle the case when KeepTypes is a reference to an empty array.
@bschmalhofer bschmalhofer changed the title Docker: Maint::Cache::Delete does not delete the redis cache Maint::Cache::Delete does not honor --keeptype in the Redis case Aug 19, 2020
bschmalhofer added a commit that referenced this issue Aug 19, 2020
Issue #311: ignore .swn files, as generated by vim
@bschmalhofer
Copy link
Contributor Author

The tests look good. Closing when a manual inspection looks fine too.

@bschmalhofer
Copy link
Contributor Author

Manually tested Maint::Cache::Delete with:

  • option --type => only the passed type was deleted
  • several options --keeptype => passed types were not deleted
  • no option => db was emptied, including the entry for namespaces

Looks good, closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

1 participant