Jump to content
Sign in to follow this  

I'm utilising transients to cache api responses - should I be using a dedicated database table instead?

Recommended Posts


I'm successfully caching third-party api responses on my site using transients, and setting new transients if they don't exist for a query. It's super-quick and the get/sets are really easy.

But I can see this is quickly growing my wp_options table as they do not automatically delete (I'm aware they expire, however the records still remain).

With growth, potentially we could be talking of hundreds of new transients daily. They're set to expire after a week.

Should I be using a dedicated database table instead of cluttering my wp_options? Or just having a cron running to delete old transients? What are your thoughts?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this