ri > AbstractController::Caching::Fragments

📦 AbstractController::Caching::Fragments

🚀 Quick Reference

Use CaseCommandDescription
Expire a fragment cacheexpire_fragment(key)Manually remove a cached fragment by key
Check if a fragment existsfragment_exist?(key)Test whether a fragment is cached
Read a cached fragmentread_fragment(key)Retrieve the value of a cached fragment
Write a fragment cachewrite_fragment(key, value)Store a value in the fragment cache
Combine fragment cache keycombined_fragment_cache_key(key)Generate a composite key for fragment caching

📖 DESCRIPTION

Fragment caching is used for caching various blocks within views without caching the entire action as a whole. This is useful when certain elements of an action change frequently or depend on complicated state while other parts rarely change or can be shared amongst multiple parties. The caching is done using the cache helper available in the Action View. See ActionView::Helpers::CacheHelper for more information.

While it's strongly recommended that you use key-based cache expiration (see links in CacheHelper for more information), it is also possible to manually expire caches. For example:

expire_fragment('name_of_cache')

🔗 Extended by

ActiveSupport::Concern (from /home/chedong/.local/share/rdoc)

🔧 INSTANCE METHODS

AbstractController::Caching::Fragments
📦 AbstractController::Caching::Fragments 🚀 Quick Reference 📖 DESCRIPTION
🔗 Extended by
🔧 INSTANCE METHODS

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-31 12:22 @216.73.217.152
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format