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 to include jQuery and JavaScript files correctly?
- $_POST form request with admin-post
- How do I log plugin (cron) actions?
- How can I run AJAX on a button click event?
- Adding pre-publish checks with Gutenberg
- Error getting correct blog_id on MU from functions.php
- How Do I Make WordPress Run an Event Every Day?
- How to add SQL file with PHP to WordPress database [closed]
- array_map() for sanitizing $_POST
- Is there a faster way than wp_insert_post to add content to a blog
- How to include external library in wordpress plugin
- Delete a specific item menu when I deactivate my plugin
- Platform/Website that Supports Crowd-Funded WordPress Projects? [closed]
- Get user id for delete and update selected user
- How can I call template partials inside my custom plugin
- Decrease RSS cache time in plugin?
- Add version query tag to all images
- Creating table with plugin is not working
- How to delete an user including data from custom database tables
- Is it safe to call do_action and apply_filters for built-in hooks?
- Creating a Link Text like Submit Button in Admin Page
- 403 Error when text is pasted in Custom Metabox Textarea
- Multiple Plugin best practice in Multisite
- How to extend WooCommerce API to show bookable product availability rules?
- Memberpress Hooks and Activity
- WordPress allows multiple users to have same email ID; and I’ve a problem with it!
- Using WAMP, trying to create a plugin, getting error: You do not have sufficient permissions to access this page
- wordpress is adding a second backslash when I use addslashes
- Silently register plugin pages
- Plugin: database creation
- Loading Modernizr (or other JavaScript libraries) for use in a plugin
- How do I remove folder and contents I have created while installing plugin
- Menu page with minimum capability as ‘Subscriber’ doesn’t allow ‘Admin’ to access it?
- I have this error notice ‘wp_enqueue_script was called incorrectly’ in my plugin
- Pass CF7 form data to plugin
- WP Dropdown Categories, display subcategories but not grandchildren categories?
- wpdb->get_var always returning 0
- A function that will remove HTML and tags from a string?
- Setting a post’s category
- Questions about meta box: nonce and parameters available
- Remove Products From Category
- Using WordPress with WP Statistics for QR code usage survey
- Integrating a Gutenberg custom block within a larger plugin
- Add default value from selection
- How can I create a wp plugin with this code
- How to Login a User inside a Plugin and Redirect to page?
- Gutenberg component in a plugin admin
- WP Query date_query with several date range
- Add a new tag based on the category name in the publish event
- WordPress function is not called and ajax return 0
- Caption Shortcode: what filter to change the image size?
- How to search on the field that stores escaped strings?
- Issue on Getting WP Gallery Items In cpt-single.php As Attachments
- Plugin translation not being displayed
- Adding Meta box to thrid-party plugin
- Identifying a Page Containing Shortcode at `init`
- Show Metabox Images in slideshow instead of static
- How to conditionally include a custom field on category editor screen not category “add” screen
- Method not receiving attributes from shortcode call, general OOP problems
- Is It Possible to Use the Block Editor’s Notification Feature to Send Another Notification After the Post Is Saved?
- Can we write custom DOM manipulation inside edit.js file while developing custom Gutenberg block?
- User set default settings for a Block in Site Editor