Halloween Sale 15% off Ends in See the plans

Snippet Library

Developer snippets for WordPress

Snippets for developers: debugging helpers, custom cron schedules, body classes, REST API tweaks and admin tools for checking hooks and queries. Building blocks for people who write code for WordPress every day.

1–3 of 3 snippets “caching”

  • PHP Developer

    Cache Any Expensive Result With One Function

    Adds a wpide_remember() helper that returns a cached value if there is one, or runs your function, stores the result for a set time and returns it, which makes caching slow queries and API calls a one-liner.

  • PHP Developer

    Transients Viewer Under Tools

    Adds a Tools > Transients screen listing the cached transients stored in the database with their size and expiry time, and lets administrators delete a single one to force a refresh.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.