這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

ShortCache

外掛說明

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.

螢幕擷圖

  • Settings screen.

安裝方式

  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.

常見問題集

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.

使用者評論

閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈ShortCache〉的開發相關工作。

參與者

將〈ShortCache〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

0.2.0

  • Initial release on wp.org

0.1.0

  • Initial release