Automatically update content group lists
Summary
Caching support for non-entity endpoints has been added. This is now used for room stats which are used to content group lists.
Previously, the loaded groups for the list were updated when the name or the count of contents changed. Now, the list is self is updated, i.e. newly created or published groups are added and groups are removed when unpublished or deleted.
Also previously, the nav bar could only update automatically when already loaded content groups changed. By listening additionally to stats changes, the bar is now aware of any changes to the complete list of groups that is accessible by the user.
Related refactoring
A new AbstractCachingHttpService
has been added which allows caching
of the responses of endpoints which are not related to a specific
entity.
The new inheritence hierarchy now is:
AbstractEntityService -> AbstractCachingHttpService -> AbstractHttpService
In contrast to the AbstractEntityService
, the new service supports
caching of items but cannot update them out-of-the-box. Custom logic for
the endpoint is needed to react to the appropriate WS change events.
The CachingService
has been refactored to support separate caches.
This now used to have one shared cache and a separate cache for the
current room. This has the advantage that the full room cache can be
cleared on room changes while items of the shared cache can be kept.
Furthermore, a separate service is now used for room stats.
Backend dependencies
- particify/dev/foss/arsnova-backend!403