Toolverse
All skills

managing-api-cache

by jeremylongshore

Implement intelligent API response caching with Redis, Memcached, and CDN integration.\nUse when optimizing API performance with caching.\nTrigger with phrases like \

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Backend
Views
20

About this skill

Implement intelligent API response caching with Redis, Memcached, and CDN integration.\nUse when optimizing API performance with caching.\nTrigger with phrases like \

How to use

  1. Zainstaluj wymaganą bibliotekę klienta cache: ioredis dla Node.js, redis-py dla Pythona lub Lettuce dla Javy. Upewnij się, że masz dostęp do instancji Redis 6+ lub Memcached dla deploymentów wieloinstancyjnych.

  2. Przeanalizuj charakterystykę swoich endpointów API, aby sklasyfikować je na trzy kategorie: w pełni cachowalne (dane statyczne), warunkowo cachowalne (dane specyficzne dla użytkownika) oraz nigdy nie cachowalne (mutacje, dane w czasie rzeczywistym). Użyj Read i Grep do przeglądu kodu.

  3. Zaimplementuj middleware generowania kluczy cache, który tworzy deterministyczne klucze na podstawie metody HTTP, ścieżki, posortowanych parametrów zapytania i istotnych nagłówków takich jak Accept czy hash Authorization dla cache'ów specyficznych dla użytkownika.

  4. Zbuduj middleware cache-aside, które sprawdza cache przed wykonaniem handlera. Jeśli odpowiedź jest w cache, zwraca ją z nagłówkiem X-Cache: HIT; w przeciwnym razie wykonuje handler, cachuje wynik i zwraca z X-Cache: MISS.

  5. Skonfiguruj TTL (time-to-live) dla każdej kategorii endpointów: długie TTL (1 godzina) dla danych referencyjnych, średnie TTL (5-15 minut) dla danych użytkownika i krótkie TTL (1 minuta) dla danych quasi-statycznych.

  6. Opcjonalnie skonfiguruj CDN z obsługą cache control (CloudFront, Cloudflare, Fastly) do cachowania na krawędziach sieci, a następnie monitoruj wskaźniki trafień i chybień cache oraz szybkość eksmisji, aby dostroić strategie cachowania.

Related skills

dotnet-backend

by anton-abyzov

.NET/C# backend developer for ASP.NET Core APIs with Entity Framework Core. Builds REST APIs, minimal APIs, gRPC services, authentication with Identity/JWT, authorization, database operations, background services, SignalR real-time features. Activates for: .NET, C#, ASP.NET

Backend
92296

himalaya

by openclaw

CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).

Backend
35108

context-optimizer

by openclaw

Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window. Features intelligent compaction (merging, summarizing, extracting), query-aware relevance scoring, and hierarchical memory system with context archive. Logs

Backend
2964

pdf-to-markdown

by aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions \

Backend
355664

sql-optimization-patterns

by wshobson

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

Backend
40163

travel-planner

by ailabs-393

This skill should be used whenever users need help planning trips, creating travel itineraries, managing travel budgets, or seeking destination advice. On first use, collects comprehensive travel preferences including budget level, travel style, interests, and dietary

Backend
4379