This PR changes the LRUDiskCache implementations to use the dispose function of the LRU implementation to clear the disk cache instead of implementing it on get and set functions.
What problem is this solving?
After adding some LRUDiskCache to our code, we saw that its metrics were not working correctly. By checking the implementation, I suspect that when any key needs to be removed from the cache, none of the keys will be retrieved due to this logic. The key to be deleted is not being verified before removal.
How should this be manually tested?
I think the only way to test this properly is installing it in some accounts and check the behavior.
Types of changes
[x] Bug fix (a non-breaking change which fixes an issue)
[ ] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Requires change to documentation, which has been updated accordingly.
What is the purpose of this pull request?
This PR changes the LRUDiskCache implementations to use the dispose function of the LRU implementation to clear the disk cache instead of implementing it on get and set functions.
What problem is this solving?
After adding some LRUDiskCache to our code, we saw that its metrics were not working correctly. By checking the implementation, I suspect that when any key needs to be removed from the cache, none of the keys will be retrieved due to this logic. The key to be deleted is not being verified before removal.
How should this be manually tested?
I think the only way to test this properly is installing it in some accounts and check the behavior.
Types of changes