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 ConfigEntityBase::getCacheTagsToInvalidate() method to add 'oembed_providers:oembed_providers' as a cache tag for these config entities. Ended up going with the 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.

Comments

Chris Burge created an issue. See original summary.

chris burge’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new4.33 KB

Patch attached.

chris burge’s picture

Issue summary: View changes

  • Chris Burge authored 5e6749c on 1.0.x
    Issue #3128681 by Chris Burge: oembed_providers:oembed_providers...
chris burge’s picture

Assigned: chris burge » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.