If you have a persistent object cache setup, then transients will not write to the database: they’ll be stored in memory. Reviewing the definition of set_transient()
this can be seen:
if ( wp_using_ext_object_cache() || wp_installing() ) {
$result = wp_cache_set( $transient, $value, 'transient', $expiration );
}
Only if no external cache is in place do transients write to the database.
Try setting a value with set_transient()
, and then attempt to recall the value using get_transient()
. If you receive the value back, then there’s some sort of cache running. If you don’t receive the correct value back, then there’s something else going on, and will need to dig into set_transient()
to see what’s going wrong where.
Related Posts:
- When should I be using the Transients API?
- Cache remote (HTTP) request with Transients API
- Is there any danger in deleting all transients?
- Why are transients cleared prematurely?
- Get a list of existing transients
- Storing posts social counters by using transient api
- How to save new transients if query changes?
- Integrating WP-TLC-Transients with WordPress – Where to Begin?
- Is priming a Transient Cache possible?
- What causes a transient to changes status to “Does Not Expire”?
- Reset Transient on New Day
- How to use transients and variables
- Transient storage location? database/xcache/w3Total Cache?
- How to delete transients written by fetch_feed()?
- Set Transient expiration
- WordPress transient doesn’t use the transient
- How do I reset a transient when updating a widget’s value?
- How to clear Transients on all sites in Multi Sites environment
- Is this the proper usage of creating / using a transient?
- Should I use the Transients API to temporarily hold edited attachements?
- transient or not transient
- Can Transients be used to store sensitive data?
- wp_options flooded with transient API entires
- Why Transients may not work correctly?
- How many transients is too many transients
- Synchronize Data every minute with set_transient
- Difference between get_site_transient() and get_transient()
- delete_transient on click inside a widget form
- Set_Transient to end at midnight
- Whats wrong with this transient? Not caching as expected
- Set transient with get posts error
- Clear Transients
- Unique Transients user id for Non-Logged In users
- Transient is never set. Why?
- Button to clear transients
- Set transient name
- Hacked site using transient API?
- Ajax call to transients
- Why can’t I save encrypted data in a transient?
- Doesn’t set_transient() add multiple rows with the same key?
- How does object caching work?
- Should I use Transient API to store HTML String, or Object?
- Best practices for using the transients API
- Are transients private or public?
- Using transients in conjunction with memcached
- Do WordPress’ cron’s clean up expired transients?
- Why does WordPress create two transients with the same name when I specify timeout value?
- Fragment caching increasing database queries
- WordPress transients for a shortcode
- How to delete a transient on post/page publish?
- Looping through posts per category gives same posts for each category
- Transients vs CRON +Custom Fields: Caching Data Per Post
- Transient not working for custom loops
- Transient / object cache maximum key length [duplicate]
- get_transient(), PHP switch(), and comparison operators
- Storing an XML Response (Transient)?
- How can I store an image in the database with Transients API?
- Transient caching for wp query
- Get the timout value of a saved transient?
- how to get the value of time left for a transient
- How does WordPress handle sessions?
- Web scraping using transients
- Clearing cached plugin data if it is using an external object cache
- Can set_transient() be used in multi-site?
- Minimize database queries to user tables?
- Only a part of array is stored in transient – what could be causing this?
- How to use transient in this code for related post?
- Delete a WordPress transient from a shortcode on Page/Post update
- Transients are not expiring as expected in simple custom plugin
- Store a default value for a transient on plugin activation
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Transient not behaving as expected
- How to decode wordpress transient cache stored in database?
- How to make use of Transient API as cookie
- After having installed APC Object Cache Backend transients stopped working
- How to cache wp_query with pagination using transients?
- Compare custom taxonomies of updated post (or new post) [Updated with progress]
- passing markup thought a shortcode attribute
- Compare transient data with a meta box value
- WordPress transient not working with WP Engine
- How to write update query in WordPress to expire transients
- Workflow for new importer plugin – your advices?
- Storing temporary data for a custom post type
- Managing and deleting transients with dynamically generated transient names
- Change WooCommerce product and variation prices programatically without affecting performance
- Need help in setting up a transient using API Key and if possible updating it in the ACF field
- set_transient fails if the value has more than 60.000 characters
- Using transients to store form notifications
- Is it possible to restore an expired transient?
- Transient not working for external data
- Add Hook for clearing transient when post is added
- Cannot get transient to work on shortcode, Moz API
- Delete Transient when clicking ‘Save Changes’ on options page
- Set Transient on CPT
- How to optimize performance without transient?
- How can I stop my WordPress database collecting transients such as RSS feeds in wp_options table?
- How can I wordpress cache a database request with no existing plugin?
- How to set autoload from “yes” to “no” _transient_wp_core_block_css_files
- Skipping all WP functions for a cached version
- Theme / Divi change visitor css and site logo and all site urls based on REQUEST_URI non logged in wp user