Skip to content

Be explicit for no results when using wp transient list and external object cache #61

@GaryJones

Description

@GaryJones

When using an external object cache, transients are stored in the object cache and not in the database.

wp transient get ... will still work correctly, as it wraps the get_transient() or get_site_transient() functions.

However, wp transient list will always return an empty table, as the handler for the WP-CLI command generates some SQL to explicitly look in the options or sitemeta tables, which will be empty of transients.

Could we have an early guard clause for the list() method that reminds users that transients are stored in the object cache and so can't be displayed, if the object cache is being used?

(At least until WP core has get_transients() function that can be wrapped.)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions