salvo-caching

Apply caching strategies to Salvo-based APIs to reduce database load.

20|5|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/salvo-rs/salvo-skills --skill salvo-caching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: salvo-caching
Source: https://github.com/salvo-rs/salvo-skills/tree/main/skills/salvo-caching
Command: npx skills add https://github.com/salvo-rs/salvo-skills --skill salvo-caching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers improve Salvo-based API performance by reducing database load and speeding up response times through caching strategies.

Core Features & Use Cases

  • In-memory caching for frequently accessed routes to lower latency.
  • Cache headers and validation techniques (ETag, Last-Modified) to optimize client-side caching and conditional requests.
  • Cache invalidation patterns to ensure data consistency when underlying data changes.

Quick Start

Enable caching on a Salvo route and verify cache TTL and hit/miss behavior.

Frequently Asked Questions about salvo-caching

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

FAQPage Schema
How do I reduce database load and speed up Salvo API response times?

To reduce database load and speed up Salvo API response times, apply caching strategies like in-memory caching for frequently accessed routes. This lowers latency by serving cached data directly instead of querying the database on every request.

How does ETag validation work for optimizing client-side caching in web APIs?

ETag validation optimizes client-side caching by allowing conditional requests. The API returns an ETag header, and clients send it back; if the cached resource matches, the server returns a lightweight unchanged response, saving bandwidth and processing time.

What are the best cache invalidation patterns for maintaining data consistency in microservices?

The best cache invalidation patterns for data consistency use invalidation hooks triggered when underlying data changes. This ensures cached responses are cleared or updated across microservices, preventing stale data from being served to clients.

Can I integrate external in-memory stores like moka with Salvo for consistent cache behavior?

Yes, you can integrate external in-memory stores like moka with Salvo. Optional integration with these stores supports consistent cache behavior across distributed microservices, requiring in-code TTL configuration to manage cache expiration.

When should I not use in-memory caching for my API routes?

You should not use in-memory caching for API routes with highly dynamic, frequently changing data or low read volumes. Caching such endpoints adds unnecessary overhead and complexity, risking stale data without meaningfully reducing latency or database load.