Skip to content

Timber Cache transients not cleared #2483

@mexn

Description

@mexn

Expected behavior

All Timber related transients should be removed when calling WP CLI command clear_cache_timber resp. when calling Timber\Loader::clear_cache_timber with caching mode set to 'transient'.

Actual behavior

Transients are not cleared. Reason seems to be the fact, that transients are created with key _transient_timber_... but the query for clearing refers to _transient%timberloader_% what is oviously not matching.

Steps to reproduce behavior

Set caching mode to 'transient', use caching tag in a template {% cache 'foo' bar %} ... {% endcache %}, open a page with the template in browser, check database for existance of transients, attempt to clear cache via WP CLI wp timber clear_cache_timber and check the database again if the transients are removed.

What version of WordPress, PHP and Timber are you using?

WordPress: 5.8.1, PHP 8.0, Timber 1.18.2

How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)

Composer

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions