Det här tillägget har inte testats med någon av de 3 senaste huvudversionerna av WordPress. Det kanske inte längre underhålls och kan ha kompatibilitetsproblem när det används tillsammans med nyare versioner av WordPress.

ShortCache

Beskrivning

Allows user to cache output of any shortcode by adding a cache attribute to it. For example, cache output of [gallery] shortcode like this: [gallery cache].

Also try out my other plugins:

  • Content Cards – a plugin that makes ordinary web links great by making it possible to embed a beautiful Content Card to link to any web site.
  • Gust – a Ghost-like admin panel for WordPress, featuring Markdown based split-view editor.
  • tinyRatings – a simple rating system for WordPress. Allow your users to like, up/down vote or 5-star your posts, pages, taxonomies or even custom things.
  • tinyCoffee – a PayPal donations button with a twist. Ask people to treat you to a coffee/beer/etc.
  • tinySocial – a plugin to display social sharing links to Facebook/Twitter/etc. via shortcodes
  • tinyTOC – a plugin auto-generate tables of content for posts with many chapter headlines.
  • tinyIPPremium – stop WordPress users from sharing login information, force users to be logged in only from one device at a time.

An enormous amount of coffee was consumed while developing these plugins, so if you like what you get, please consider supporting me on Patreon.

Skärmdumpar

  • Settings screen.

Installation

  1. Install via WP Admin > Plugins > Add New or download a .zip file and upload via FTP to /wp-content/plugins/ directory
  2. Activate the plugin through the ’Plugins’ menu in WordPress
  3. (optional) Modify options via WP Admin > Settings > ShortCache, if needed.
  4. In the shortcode You want to cache, add a cache attribute: [gallery cache].
  5. (optional) You can define a custom cache interval by passing that to the attribute like this: [gallery cache="5"] – this will be cached for 5 hours.
  6. (optional) You can also define a custom cache scope by passing a cache-scope attribute: [gallery cache cache-scope="user_id,post_id"]. This will create different caches for every user and every post.

Vanliga frågor

Installation Instructions
  1. Install via WP Admin > Plugins > Add New or download a .zip file and upload via FTP to /wp-content/plugins/ directory
  2. Activate the plugin through the ’Plugins’ menu in WordPress
  3. (optional) Modify options via WP Admin > Settings > ShortCache, if needed.
  4. In the shortcode You want to cache, add a cache attribute: [gallery cache].
  5. (optional) You can define a custom cache interval by passing that to the attribute like this: [gallery cache="5"] – this will be cached for 5 hours.
  6. (optional) You can also define a custom cache scope by passing a cache-scope attribute: [gallery cache cache-scope="user_id,post_id"]. This will create different caches for every user and every post.
So, how do I cache a shortcode?

In the shortcode You want to cache, add a cache attribute: [gallery cache].

Can I control how long should it stay in cache?

Yes, there is a setting for that in Settings > ShortCache. Also You can define a custom cache interval by passing that to the attribute like this: [gallery cache="5"] – this will be cached for 5 hours.

What does ”Cache Scope” mean?

This defines how granular the cache should be. If you disable all check-boxes, one cache value will be stored for the whole site. If you check ’User ID’, a different value will be cached for every logged in user. You can also differentiate it by Post ID or the URI where the short code is displayed.

The ”Last Update Timestamp” setting ensures that caches are regenerated if there is an update (a saved post/page) somewhere on the site.

Can I control Cache Scope on per shortcode basis?

Yes, You can define a custom cache scope by passing a cache-scope attribute: [gallery cache cache-scope="user_id,post_id"]. This will create different cache values for every user and every post.

Recensioner

Läs 1 betyg

Bidragsgivare och utvecklare

”ShortCache” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.

Bidragande personer

Översätt ”ShortCache” till ditt språk.

Intresserad av programutveckling?

Läs programkoden, kika på SVN-filförvaret eller prenumerera på utvecklarloggen via RSS.

Ändringslogg

0.2.0

  • Initial release on wp.org

0.1.0

  • Initial release