ActiveTriples / linked-data-fragments

Basic linked data fragments endpoint.
Creative Commons Zero v1.0 Universal
15 stars 0 forks source link

Move cache creation out of the controllers #46

Closed no-reply closed 7 years ago

no-reply commented 7 years ago

Previously, the SubjectController handled initializing and holding onto the cache backend instance. This is not really a controller job.

f973658 reimplements this behavior in a centralized Service singleton, which maintains the cache on an application wide basis. The idea here is to centralize this responsibility, and guarantee that there is only one canonical cache backend at any given time.

644555a moves the existing controller to use the singleton, and cleans up the error handling.