memcached

memcached is a skill for Claude Code, Codex from G1Joshi/Agent-Skills. It costs 41 tokens per session (1,160 once invoked), scanned A, original, MIT.

A distributed in-memory cache that stores key-value data temporarily in RAM. Cached data is lost when the service restarts.

In plain words
What is it for?
Use it for simple read caching, session caching, and high-volume string or object lookups.
Why use it?
It speeds up repeated reads and can store web sessions without querying the main database each time. It is only a cache, not permanent storage.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for simple read caching, session caching, and high-volume string or object lookups.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/g1joshi/agent-skills/memcached
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add G1Joshi/Agent-Skills --skill memcached
Clone the repo
git clone --depth 1 https://github.com/G1Joshi/Agent-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memcached

README.md
[![agentmods](https://agentmods.dev/badge/skills/g1joshi/agent-skills/memcached/github.svg)](https://agentmods.dev/skills/g1joshi/agent-skills/memcached)
Your own site
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/memcached"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/memcached/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memcached

Your own site · 80×15
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/memcached"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/memcached.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,160 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.01160
Opus 5.5 $0.00016 $0.00464
Sonnet 5.5 $0.00008 $0.00232
Haiku 4.5 $0.00004 $0.00116

Measured 22d ago against content hash 63e37d30ae66, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memcached scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/databases/memcached/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memcached

Memcached is a high-performance, distributed memory object caching system. It is simpler than Redis. It does arguably one thing: Key-Value caching of strings/objects in RAM.

When to Use

  • High-Throughput In-Memory Key-Value Caching: Caching database query results, HTML fragments, and session tokens with sub-millisecond latency.
  • Pure Ephemeral Caching: Storing disposable data where eviction under memory pressure is acceptable (LRU eviction).
  • Multi-Threaded Multi-Core Scalability: Maximizing cache operations on large multi-core servers using Memcached's native multi-threaded architecture.
  • Simple Key-Value Lookups: Caching simple string and serialized objects where advanced data structures (Redis sets/hashes) are unnecessary.

Quick Start

# Telnet interface
set mykey 0 60 4
data
STORED

get mykey
VALUE mykey 0 4
data
END

Core Concepts

Multi-Threaded Event Loop & Slab Allocation

Memcached allocates memory in fixed slabs to prevent operating system memory fragmentation:

Memory Pool (Slab Allocator)
  ├── Slab Class 1 (Chunk Size: 96 Bytes)  -> Stores small keys & tokens
  ├── Slab Class 2 (Chunk Size: 120 Bytes) -> Stores session snippets
  └── Slab Class N (Chunk Size: 1MB)       -> Maximum item size

Consistent Hashing Client-Side Routing

Clusters scale horizontally by having client drivers calculate server destinations using consistent hashing algorithms (Ketama):

// Memcached Consistent Hashing in Node.js
import Memcached from "memcached";

const memcached = new Memcached(
  ["10.0.1.1:11211", "10.0.1.2:11211", "10.0.1.3:11211"],
  {
    retries: 2,
    retry: 10000,
    remove: true, // Automatically remove failed nodes from ring
  },
);

// Set with expiration (seconds)
memcached.set("user:415:profile", JSON.stringify(userData), 3600, (err) => {
  if (err) console.error("Cache set failed:", err);
});

Atomic Binary Protocol Operations (CAS, INCR)

Guarantees thread-safe counters and optimistic concurrency control via Check-and-Set (CAS):

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 22d ago Changed 63e37d30ae66
  2. 26d ago Changed · +75 lines · +27 tokens per session 77c90653e49d
  3. 1mo ago First seen · 60 lines · 14 tokens per session scan A 664ef0d79b23

Subscribe to this mod's changes

memcached is a skill published in the GitHub repository G1Joshi/Agent-Skills (15 stars, last pushed 23d ago), licensed MIT. It adds 41 tokens to every session and 1,160 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

deprecation-and-migration

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset…

addyosmani/agent-skills · 69 tokens

redis-operations

Redis operational runbooks — memory management, eviction policy, persistence config, Sentinel/Cluster, K8s-hosted Redis ops.

sawrus/agent-guides · 30 tokens

awesome-database-audit

Read-only audit of a database layer: schema anti-patterns, query and index fit, integrity, concurrency, migrations, tenancy, with a verdict. Use when asked to review a schema, migrations or data model.

khasky/awesome-agent-skills · 49 tokens

redis-caching-and-pubsub

Architecting high-performance caching strategies, Cache-Aside/Write-Through/Write-Behind patterns, Redis Pub/Sub, Streams, eviction policies, distributed locking (Redlock), and memory optimization. Use when implementing Redis caching, real-time messaging, rate limiting, or session management.

hamzabellouch/agent-skills · 64 tokens

data-engineering

Guides data pipeline design, ETL/ELT workflows, schema evolution, and data quality assurance. Use when building data pipelines, designing data warehouses, migrating schemas, or ensuring data integrity across systems. Use when you need reliable, testable, and observable data flows.

borhen68/SkillEngine · 59 tokens

bullmq-specialist

BullMQ expert for Redis-backed job queues, background processing, and reliable async execution in Node.js/TypeScript applications. Use when "bullmq, bull queue, redis queue, background job, job queue, delayed job, repeatable job, worker process, job scheduling, async processing, bullmq, bull, redis, queue…

omer-metin/skills-for-antigravity · 91 tokens