If the data you’re fetching is only a single or at most a few instances, then the Transients API should do the job; keep in mind it also handles the auto-expiration for you.
If the data could potentially be an unlimited (or at least medium-large) number of instances, especially if there may be even slightly complex ways of finding the correct entry to retrieve (besides just an ID), then a custom table would be advisable.
Having said that, there’s a third potential option: the file system. You could store the data serialized/jsonified in a file in a subfolder of wp-content. This is of course provided the data in question is effectively public and doesn’t need to be protected in the slightest.
Related Posts:
- Is get_option() faster than accessing get_transient()?
- Best practices for using the transients API
- Strategies to implement selective loading of plugins
- Trouble with Transient API when W3TC is activated [closed]
- How to make dynamically-generated content searchable in WordPress?
- How to sync with plugins update after I have done manual optimizations?
- Sample — test — data for large WordPress install
- How can I free up the memory used by update_post_meta?
- How can I render shortcode so that its not cached by Caching plugins?
- Does WordPress’s HTTP API use any caching?
- Will cron job run if page loaded is being served from cache?
- Cache directory needed for plugin
- Clearing cached plugin data if it is using an external object cache
- I’m designing a plugin to create database indexes. Suggestions?
- Make WordPress cache permanent for some pages until edited
- Will setcookie work if there is a cache plugin installed?
- Maximum lifetime for nonce
- Clearing caches on plugin uninstall
- How to implement filesystem cache in WordPress
- Correct way to perform non-cacheable DB query
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Caching the_content calls
- How to analyze wordpress plugin performance
- how to use shortinit in wordpress
- What’s the impact on WordPress’ performance regarding the amount of classes/files in a plugin?
- Create Widget or Enable Shortcodes in Sidebar
- Service Worker Uncaught (in promise) DOMException
- Does is_admin() really provide a plugin performance improvement?
- Should I use wp-content/cache or [PLUGIN_DIR]/cache?
- I need to refresh page to display wp_get_current_user() : why?
- How can I control if post updated
- Undefined cache functions in my custom plugin
- Is it possible to restore an expired transient?
- Plugin files not updated (cache cleared)
- Developing a plugin, ran it through P3 Profiler, shows up slow, but I don’t know why
- Using tag or inline style attribute?
- Does WP REST API cache internally executed (rest_do_request) requests?
- How to boost WP custom post REST API GET queries by custom taxonomies
- How do I create a custom role capability?
- What is the advantage of using wp_mail?
- Calling the widget id of a mult-instance widget from inside the widget?
- Do I need to call do_action in my plugin?
- WooCommerce get Shipping Class of product from either the product id or the order after order is completed
- Dequeue script, but still use wp_localize_script to pass vars
- I can’t find where a hook is being defined in a plugin – Easy Digital Downloads
- Can I add pages to my custom menu via script?
- Replacing WordPress menu functionality with a plugin
- Programmatically Selecting Theme Based on URL
- Is it possible to load plugin from console with core ?
- Plugin development: is adding empty index.php files necessary?
- Plugin base URL
- Database for development
- Customize multisite site creation with user data
- Adding plugin settings link upon activation
- How to create multiple Gutenberg blocks in one plugin
- How to disable reCaptcha v3 except on Contact Form 7 pages?
- Where to call wp_enqueue_script in a plugin with custom template?
- How to prevent UNDO on guternberg block editor
- do_action and add_action on two different installed plugins won’t work
- How to override gutenberg paragraph block edit property
- How can I get the selected string when using a toolbar button in Gutenberg?
- woocommerce_checkout_order_processed hook executing function twice
- Authorizing a plugin to call Google Analytics v4 API on wp_cron
- WordPress pre_get_posts with combined results of two queries (OR)
- Plugin directory says that my plugin it’s not availabe in Spanish, but it is
- Using ob_get_content to get_search_form puts into infinite loop
- Alternatives to DISALLOW_FILE_EDIT wp-config Constant? It Breaks Some Plugins
- Declare plugin dependency [duplicate]
- Warning: call_user_func_array() expects parameter 1 to be a valid callback
- Is there an admin hook that will let me read GET variable before it’s too late to set the header Location
- WordPress plugin development OOP style
- Let plugin check if taxonomy is already registered by another plugin
- Last-Modified header support doesnât speed up server processing – want more
- Working of foreach loop with array
- Submit form to a different PHP file in the same plugin folder
- What might be the reason of Couldn’t fetch mysqli_result on another domain?
- wp_insert_post generated mixed permalinks
- Adjust query on single
- Is there any way to pass messages from a script to a redirect target in a hidden fashion?
- What should I pass for $needed_dirs when calling _unzip_file_pclzip (aka PclZip)?
- Custom Path for a Plugin
- Trigger function on Remove block or add new block in Gutenberg JavaScript
- WPGut – Updating failed and shortcode?
- How the add_action is included in the plugin development
- Fatal error: Uncaught Error: Using $this when not in object context
- do I need to sanitize a shortcode’s function input?
- Email content as comment
- WordPress use template
- Warning: Illegal string offset – on homepage
- Organising and completing posts (mark as read and hide)
- Query only title/field/featured media of posts [closed]
- To remove rendering of menus and header, plugin or theme?
- Displaying External Data – Not Posts
- the correct way to use options from settings page [closed]
- I want to add post meta for picture thum during submit for revision
- How to synchronize an e-commerce site and a pharmacy management software?
- woocommerce features to add product along with link
- How do I modify the error code array used by “shake_error_codes” filter?
- How do I add multiple custom menu Woo-commerce my account page?
- How can i store cache of wordpress a database request without plugins?