-
Notifications
You must be signed in to change notification settings - Fork 39
Refactor cache usage #834
Copy link
Copy link
Open
Labels
choreMaintenanceMaintenancedevRelated to development, e.g. code style, refactoring, github workflows, etc.Related to development, e.g. code style, refactoring, github workflows, etc.improvementExisting functionality that can be improvedExisting functionality that can be improved
Metadata
Metadata
Assignees
Labels
choreMaintenanceMaintenancedevRelated to development, e.g. code style, refactoring, github workflows, etc.Related to development, e.g. code style, refactoring, github workflows, etc.improvementExisting functionality that can be improvedExisting functionality that can be improved
Custom cache implementations are used throughout the FDP app.
For example:
Probably it would be more robust, and clearer, to use Spring's annotation-based caching integration, using e.g.
@Cacheable, etc.Here's at least one problem with the current implementation:
The
ResourceDefinitionCachegetters are marked as possibly "not needed anymore".Actually it looks like both getter query the repository directly instead of relying solely on the cached data:
FAIRDataPoint/src/main/java/org/fairdatapoint/service/resource/ResourceDefinitionCache.java
Lines 74 to 76 in e746e9a
FAIRDataPoint/src/main/java/org/fairdatapoint/service/resource/ResourceDefinitionCache.java
Lines 79 to 80 in e746e9a