Problem/Motivation
When ProviderRepositoryDecorator->getAll() generates its provider list, it caches the list for a week. The cache is not regenerated when either 1) a custom provider is added, updated, or deleted or 2) the Providers URL is updated.
Proposed resolution
Re custom providers, these are config entities. It may be possible simply to override the Ended up going with the ConfigEntityBase::getCacheTagsToInvalidate() method to add 'oembed_providers:oembed_providers' as a cache tag for these config entities.CacheBackendInterface::delete() route instead.
Re global settings, such as the oEmbed Providers URL (and other forthcoming settings), we may need to use CacheBackendInterface::delete() to invalidate 'oembed_providers:oembed_providers' when these settings are updated.
Remaining tasks
Submit patch
Update tests
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
None. This module is still alpha.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | oembed_providers-cache_invalidation-3128681-2.patch | 4.33 KB | chris burge |
Comments
Comment #2
chris burge commentedPatch attached.
Comment #3
chris burge commentedComment #5
chris burge commented