orchardcore-caching

Configure Orchard Core response compression, dynamic shape caching, distributed caching, and cache invalidation.

13|3|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/CrestApps/CrestApps.AgentSkills --skill orchardcore-caching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orchardcore-caching
Source: https://github.com/CrestApps/CrestApps.AgentSkills/tree/main/src/CrestApps.AgentSkills.Skills/orchardcore/orchardcore-caching
Command: npx skills add https://github.com/CrestApps/CrestApps.AgentSkills --skill orchardcore-caching

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Orchard Core caching is often under-optimized or inconsistently configured across modules and deployments. This Skill provides structured guidance to implement response compression, dynamic shape caching, distributed caching, and cache invalidation to improve performance and scalability.

Core Features & Use Cases

  • Guidance to enable OrchardCore.ResponseCompression, OrchardCore.DynamicCache, and IDistributedCache integration.
  • Examples of cache invalidation with ISignal and CacheContext to keep content fresh across content changes.
  • Real-world scenarios: improving page load times for dynamic content, fragment caching in Razor and Liquid templates, and cross-instance cache sharing via Redis.

Quick Start

Follow the prompts below to set up and exercise caching in an Orchard Core project, starting from enabling core caching components to validating cache invalidation on content changes.

Frequently Asked Questions about orchardcore-caching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure distributed caching in Orchard Core using IDistributedCache?

To configure distributed caching in Orchard Core, integrate IDistributedCache to enable cross-instance cache sharing via Redis. This allows multiple application instances to share cached data, improving scalability across distributed deployments.

How does cache invalidation work with ISignal and CacheContext in Orchard Core?

Cache invalidation in Orchard Core uses ISignal and CacheContext to trigger cache refreshes when content changes. This mechanism ensures dynamic shape caching remains fresh by invalidating specific cached fragments upon content updates.

What is the best way to enable response compression in an Orchard Core application?

The best way to enable response compression is by activating the OrchardCore.ResponseCompression feature. This reduces payload sizes and improves page load times across Orchard Core modules without modifying individual controller logic.

Can I use dynamic shape caching for fragment caching in Razor and Liquid templates?

Yes, OrchardCore.DynamicCache supports fragment caching directly within Razor and Liquid templates. It allows you to cache specific rendered shapes or partial views, significantly improving page load times for dynamic content.

When do I need Orchard Core caching for my dynamic content?

You need Orchard Core caching when dynamic content causes repetitive rendering overhead. Configuring dynamic shape caching and response compression optimizes performance by storing rendered fragments and reducing processing for repeated requests.

Why does my Orchard Core cache not invalidate correctly after content updates?

Cache invalidation issues often occur when ISignal triggers are not properly configured within the CacheContext. Ensure signals are fired on content changes so the corresponding cached fragments are explicitly invalidated and refreshed.