Rethink use of Guava cache using play's plugin architecture #337
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
What started off as a simple rewrite of tattler (logging user id) ran into issues
when I found ~20 unit tests that were not running.
Getting the unit tests to run resulted in failure and
so began a journey into the guts of the cache plugin architecture
Previously we use squeryl callback mechanism to implement
domain model caching. Why? I'm no so sure, but this did lead
to some fairly tight coupling of domain objects and caching logic.
We also use Guava cache at a few different places
(a) Cache file (user spec) for FileAuthentication
(b) Cachining permissions file
(c) Authenticated ldap users
(d) Metrics used with graphing
(e) Provisioning profiles
This pulls out the use of Guava cache from play's plugin arch
keeps the use cases other than domain objects in place, and
no longer caches domain objects.
Since we no longer use caching for domain objects, I updated
the admin page to not display cache stats. We can always
add those back in.