-
Notifications
You must be signed in to change notification settings - Fork 583
dev.guidelines
These are some things to consider when you add code to Ehcache, but certainly when you review a PR!
See what’s there for now… Ping us on the developer mailing list. We’ll export settings for majors IDEs here asap.
All changes need to come with appropriate test coverage.
Should you break an existing test, take great care before touching the test code to "fix it". While it could definitively be that the test is wrong, it may be correct as well. Always assume the latter is true first. If in doubt, again, ping us on the developer mailing list.
Changing an existing test for it to pass, because of you recent changes, should really be the last resort. Other than for compilation obviously, or adding mocks and the like.
We use slf4j
for all our logging here…
What level should be used for logging should be dependent on whether you log for the user’s benefit (e.g. lifecycle), debugging purposes (a standard Cache.get(K): V
path). But we don’t log WARN
or ERROR
.
We log things about lifecycle:
-
Bootstrapping
CacheManager
, -
Adding, removing
Cache
to CacheManager -
…
Basically everything that would be informational to the end-user.
Helps us trace stuff, when some weird scenario is being debugged.
-
Delegating to
CacheLoader
, -
Delegating to
ResilienceStrategy
, -
Store
internals…