Skip to content

Document Mautic 8 CacheStorageHelper removal migration for Plugin developers - #617

Open
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-17033-cachestoragehelper-removal
Open

Document Mautic 8 CacheStorageHelper removal migration for Plugin developers#617
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-17033-cachestoragehelper-removal

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open in Promptless

Mautic 8 removes the deprecated CacheStorageHelper and its mautic.helper.cache_storage service in favor of CacheBundle. This adds a 'Migrating to CacheBundle in Mautic 8' section to the Plugins > Cache developer page so Plugin and Integration developers can update their code.

The new section documents the three developer-facing changes: replacing CacheStorageHelper by injecting CacheProviderInterface and calling getSimpleCache() for the PSR-16 API (including the two behavior changes — a cache miss now returns null instead of false, and cached data now lives in the configured cache_adapter rather than the cache_items table); the changed AbstractIntegration::getCache() return type and constructor argument; and the WidgetDetailEvent API changes (setCacheDir() removed, $cacheProvider now required, setTemplateData() no longer takes $skipCache). Each change includes a before/after code example.

Files touched: docs/plugins/cache.rst

Trigger Events

Mautic 8 (mautic/mautic#17033) removes the deprecated CacheStorageHelper
and its mautic.helper.cache_storage service in favor of CacheBundle. Add a
'Migrating to CacheBundle in Mautic 8' section to plugins/cache.rst covering
the CacheProviderInterface/PSR-16 replacement (incl. null-vs-false miss and
cache-clear behavior), the AbstractIntegration::getCache() signature change,
and the WidgetDetailEvent API changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants