← Back to Blog

Why Your Cache Is the Biggest Compliance Gap in Your Stack

May 11, 2026 | 16 min read | Engineering

Your database is encrypted. Your API has auth. Your logs ship to a SIEM. But your cache? Redis stores everything in plaintext. No access controls. No audit trail. No integrity verification. It is the biggest unaudited surface in your infrastructure -- and your SOC 2 auditor is about to find it.

This is not a theoretical risk. In the last twelve months, SOC 2 Type II auditors have started asking specific questions about cache infrastructure: how cached values are encrypted, who can read them, how integrity is verified, and where the audit trail is. Most engineering teams have no answer. Most cache infrastructure was never designed to have one. The result is an audit exception on your SOC 2 report -- visible to every customer who requests it.

The Invisible Surface

Every company that runs a web application caches data. Session tokens live in Redis. User profiles live in Memcached. API responses live in ElastiCache. Computed results -- fraud scores, recommendation lists, pricing calculations, search rankings -- live in whatever cache tier the team chose when they needed something faster than a database query. The cache layer is the most accessed component in your stack. It handles more requests per second than your database, your API, and your CDN combined.

It also handles the most sensitive data. Session tokens are proof of identity. User profiles contain PII -- names, emails, addresses, phone numbers. API responses contain whatever your application returns, which often includes financial data, health information, or personally identifiable records. Fraud scores determine whether a transaction is approved or blocked. Recommendation results reveal behavioral patterns. The cache is not holding throwaway data. It is holding the same data your database holds, and in many cases it is the primary read path -- more clients read from cache than from the database.

80%+
Reads Served from Cache
0
Redis Integrity Checks
0
Redis Read Audit Logs

Now consider the security posture of this critical, data-rich component. Your database has encryption at rest (AES-256, managed by AWS KMS or your own HSM). Your database has role-based access controls (each service connects with its own credentials, restricted to specific tables and columns). Your database has query audit logging (every SELECT, INSERT, UPDATE, and DELETE is logged with the principal that executed it). Your database has integrity verification (checksums on every page, WAL-based consistency guarantees). Your database passes SOC 2, HIPAA, PCI DSS, and FedRAMP audits because it was designed with these controls from day one.

Your cache has none of this. Redis stores values in plaintext in memory. Any process on the host can read them. Redis AUTH is a single password for the entire instance -- no per-service, per-key, or per-operation access controls. Redis does not log read operations in production (MONITOR degrades performance by 50% or more). Redis does not verify integrity -- when you GET a key, you receive whatever bytes are stored, with no verification that they have not been modified. Your cache holds the same data as your audited, encrypted, access-controlled database, and it has zero security controls around it.

This is the invisible surface. Invisible because nobody audits the cache. Invisible because the cache is treated as a performance optimization, not a data store. Invisible because it does not appear in your data flow diagrams, your threat models, or your compliance questionnaires. But it holds real data, sensitive data, regulated data -- and it is wide open.

The Gap Nobody Talks About

Your database has encryption, access controls, audit logging, and integrity verification. Your cache holds the same data but has none of these controls. This is not an edge case. This is the default state of every Redis, Memcached, and ElastiCache deployment in production today. And auditors have started asking about it.

What Redis Actually Provides (And What It Does Not)

Redis is excellent at what it was designed to do: store data structures in memory and serve them fast. It was not designed for compliance, and claiming it fails at compliance is like claiming a sports car fails at off-roading. The problem is not that Redis is bad software. The problem is that it is being used to store sensitive data in environments that require security controls Redis was never built to provide.

No Encryption at Rest in Memory

Redis stores all data in plaintext in memory. AWS ElastiCache offers "encryption at rest," but this encrypts the EBS snapshots and the replication stream -- not the data in memory. While the Redis process is running, every cached value is plaintext in RAM. Any process on the host with sufficient privileges (or any exploit that achieves memory read access) can read every cached value. This includes session tokens, PII, financial data, health records, and anything else your application caches.

The distinction between volume encryption and application-level encryption matters for compliance. Volume encryption protects against physical theft of storage media. It does not protect against a compromised process reading memory, a privilege escalation attack on the host, or an insider with SSH access. SOC 2 and HIPAA auditors understand this distinction. "Our EBS volumes are encrypted" is not a sufficient answer when they ask how cached ePHI is protected at rest.

No Per-Key Access Controls

Redis 6 introduced ACLs that restrict users to specific commands and key patterns. You can create a user that can only run GET on keys matching session:*. But this is pattern-level access control, not data-level access control. If Service A and Service B both match the session:* pattern, they can both read every session. You cannot restrict Service A to only its own sessions. There is no concept of data ownership, row-level security, or attribute-based access control. Every client that passes the pattern check has access to every key that matches.

For compliance purposes, this means you cannot demonstrate separation of duties at the cache layer. Your fraud service and your marketing analytics service can both read the same cached user profiles. Your internal admin tool and your customer-facing API can both read the same session tokens. There is no access boundary, no data classification, and no enforcement of least-privilege at the cache level. The auditor asks "who can read cached PII," and the honest answer is "anyone with Redis AUTH credentials."

No Audit Logging of Reads

Redis provides two mechanisms for observing commands: SLOWLOG and MONITOR. SLOWLOG only records commands that exceed a configurable latency threshold -- it is a performance debugging tool, not an audit log. MONITOR streams every command to the client that runs it, but it degrades Redis throughput by 50% or more in production and is explicitly documented as unsuitable for production use. Neither produces a permanent, tamper-evident record of which clients accessed which keys and when.

Without read audit logs, you cannot answer the most basic audit question for your cache: who accessed this data? Your database audit log shows every query. Your application access log shows every API request. Your cache access log shows nothing. This is the gap that auditors find when they trace a data flow from API to database and discover that the cache -- which served 80% of the responses -- has no record of who read what.

No Integrity Verification

When you run GET key on Redis, you receive bytes. Those bytes might be the value your application stored. They might be a modified value injected by an attacker who compromised the Redis instance. They might be corrupted data from a memory error. You have no way to know. Redis does not compute checksums, does not sign values, does not maintain integrity proofs. The client trusts whatever Redis returns. There is no verification, no attestation, and no detection mechanism.

In a threat model where Redis can be compromised -- and any system can be compromised -- this means every cached value is suspect. An attacker who gains write access to Redis can modify fraud scores (approving fraudulent transactions), change user roles (escalating privileges), alter session data (hijacking identities), or poison recommendation results (manipulating user behavior). None of these modifications would be detected by any client. The cache would serve the modified values, and every consumer would trust them.

The 5 Auditor Questions Your Cache Cannot Answer

When a SOC 2 Type II auditor examines your infrastructure, they follow the data. They trace a request from the client through the API, through the application, to the database. And increasingly, they trace it through the cache. Here are the five specific questions auditors are now asking about cache infrastructure, and why Redis cannot answer any of them.

Question 1: "Can you prove this cached value hasn't been modified?"

This question tests Processing Integrity. The auditor wants to know that the value your cache returns is the same value that was originally stored. Redis cannot prove this. There is no signature, no checksum, no integrity proof on any cached value. The only honest answer is "we trust that Redis stored it correctly and that nobody modified it." That is faith, not evidence. SOC 2 requires evidence.

In Cachee, every value is signed by three independent PQ signature algorithms at write time. At read time, all three signatures are verified before the value is returned. If any signature fails, the value is rejected. The verification is a mathematical proof, not a trust assumption. An auditor can take the value, the signatures, and the public keys, and independently verify that the value has not been modified. No trust in Cachee required. No trust in your infrastructure required. The proof is self-contained.

Question 2: "Who accessed this cached entry and when?"

This question tests Security and Confidentiality. The auditor wants a record of every access to sensitive cached data -- who read it, when, from where. Redis does not produce this record. MONITOR can stream commands in real time, but it is not a permanent log, it degrades performance by 50%, and it is not suitable for production. There is no built-in, production-grade, tamper-evident access log in Redis.

In Cachee, every cache operation is recorded with a computation fingerprint that identifies the operation, the key, the timestamp, and the key type (Owner, Regulator, or Auditor) that performed it. The log is append-only and hash-chained: every entry links to its predecessor via SHA3-256, making the log tamper-evident. If an entry is modified or deleted, the chain breaks and the tampering is detectable. The auditor gets a complete, cryptographically secured access history for every cached key.

Question 3: "Can you reconstruct what was in cache at time T?"

This question tests Processing Integrity and Availability. The auditor may need to understand what data was in your cache at the time of a specific event -- a security incident, a customer complaint, a regulatory inquiry. Redis cannot answer this question. Redis is an in-memory store that overwrites values in place. Once a key is overwritten or expires, the previous value is gone. There is no history, no versioning, no temporal state.

In Cachee, every key has a hash-chained history from genesis to its current state. Every write, supersession, revocation, and expiration is recorded in the chain. Because the chain is deterministic -- each entry is a function of the previous entry and the current operation -- you can replay the chain to any timestamp and reconstruct the exact state. This is not log-based approximation. This is deterministic reconstruction from a cryptographic data structure. The state at time T is computed, not estimated.

Question 4: "Is your cache encrypted at the application level?"

This question tests Confidentiality. The auditor distinguishes between volume encryption (protects against physical theft) and application-level encryption (protects against process-level access). Redis does not encrypt data at the application level. The data is plaintext in memory. Even ElastiCache's "encryption at rest" encrypts the snapshot, not the runtime memory. Any process on the host with read access to Redis memory can see every cached value in plaintext.

In Cachee, every entry is cryptographically bound to its computation fingerprint and signed by three PQ algorithms. While the cached value itself is stored for fast access, it cannot be meaningfully extracted without the signature verification context. More importantly, the three-tier key hierarchy (Owner, Regulator, Auditor) means that even authorized access is tiered: Auditor keys can verify that a computation was cached and attested without reading the cached value itself, enabling zero-knowledge compliance queries that satisfy confidentiality requirements without exposing data.

Question 5: "What happens to cached PII when a user requests deletion?"

This question tests Privacy, and it is specifically relevant to GDPR Article 17 (right to erasure) and CCPA. When a user requests deletion, every copy of their data must be removed -- including cached copies. Redis has TTL-based expiration, but there is no mechanism to prove that a specific value was deleted, no record of when the deletion occurred, and no verification that the value is truly gone (as opposed to still in memory awaiting lazy deletion).

In Cachee, deletion is a state transition -- from Active to Revoked -- that is recorded in the hash chain with a TransitionAuthority and a TransitionProof. The revocation record is permanent evidence that the deletion occurred, when it occurred, and who authorized it. An auditor or a data subject can verify that their data was deleted by checking the revocation entry in the chain. The proof that data was deleted is as strong as the proof that it existed in the first place.

Five Questions. Zero Redis Answers.

These are not hypothetical questions. They are questions that SOC 2 Type II auditors are asking right now about cache infrastructure. Redis cannot answer any of them. Not because Redis is broken -- because Redis was never built for compliance. If your cache handles sensitive data and you cannot answer these questions, you have an audit exception waiting to happen.

Framework-by-Framework Exposure

The cache compliance gap is not specific to SOC 2. Every major compliance framework has requirements that your cache violates if it operates like a standard Redis instance. Here is the specific exposure for each framework.

SOC 2: Processing Integrity and Confidentiality Both Fail

Processing Integrity requires that data processing is complete, accurate, and authorized. When your cache serves values without integrity verification, you cannot prove accuracy. When any authenticated client can read any key that matches a pattern, you cannot prove authorization. Confidentiality requires that sensitive information is protected throughout its lifecycle. When cached data is plaintext in memory with no application-level encryption, confidentiality is not enforced at the cache layer. Both criteria generate exceptions.

HIPAA: Cached ePHI with No Encryption or Access Logging

HIPAA requires that electronic Protected Health Information (ePHI) is encrypted at rest and in transit, that access is logged, and that integrity is maintained. If your healthcare application caches patient data, lab results, appointment details, or prescription information in Redis, that cached ePHI is plaintext in memory with no access logging and no integrity verification. This is a HIPAA Security Rule violation under the Technical Safeguards (164.312). The fine schedule starts at $100 per violation and escalates to $50,000 per violation for willful neglect.

GDPR: Cached Personal Data with No Erasure Mechanism

GDPR Article 17 requires that personal data be erased upon request. Redis TTL-based expiration is not provable erasure -- there is no record that a specific value was deleted, no timestamp of the deletion, and no mechanism to prove to the data subject that their data was removed. GDPR Article 5(1)(f) requires integrity and confidentiality of personal data. Cached PII in plaintext memory without access controls or integrity verification violates this principle. GDPR fines can reach 4% of annual global revenue or 20 million euros, whichever is higher.

FedRAMP: Unencrypted Cache as Separate Boundary Component

FedRAMP requires that every component within the authorization boundary implements the NIST 800-53 control baseline. Your cache is a component within the boundary. It processes, stores, and transmits federal data. If it does not implement SC-28 (Protection of Information at Rest), SC-8 (Transmission Confidentiality and Integrity), AU-2 (Audit Events), and SI-7 (Software, Firmware, and Information Integrity), it does not meet the baseline. A cache that cannot satisfy these controls creates a gap in your FedRAMP authorization that your 3PAO will identify during assessment.

PCI DSS: Cached Card Data in Plaintext Memory

PCI DSS Requirement 3 mandates that stored cardholder data is protected. If your payment processing application caches transaction data, card tokens, or authorization responses in Redis, that data is plaintext in memory. PCI DSS Requirement 3.4 requires rendering PAN unreadable wherever it is stored. PCI DSS Requirement 10 requires logging and monitoring of all access to cardholder data. Redis satisfies neither. If your cache is within the cardholder data environment (CDE), and it almost certainly is if it caches payment-related data, it fails PCI DSS on multiple requirements.

FrameworkCache ViolationSpecific RequirementConsequence
SOC 2No integrity verification, no confidentialityProcessing Integrity, Confidentiality TSCException on SOC 2 report
HIPAAPlaintext ePHI in cache memory164.312 Technical Safeguards$100 - $50,000 per violation
GDPRNo provable erasure, plaintext PIIArticles 5(1)(f), 17Up to 4% annual revenue
FedRAMPMissing NIST 800-53 controlsSC-28, SC-8, AU-2, SI-7Authorization gap
PCI DSSPlaintext card data, no access loggingRequirements 3, 10Fines, loss of processing ability

The Fix: Audit by Architecture, Not by Add-On

There are two ways to address the cache compliance gap. The first is to bolt compliance onto your existing cache. Add a sidecar proxy that logs access. Encrypt values before writing them to Redis. Build a custom integrity checking layer that checksums values. Implement a log aggregation pipeline that collects cache access events and ships them to your SIEM. Build a custom key management system for the encryption keys. Add monitoring for tamper detection.

This approach fails for three reasons. First, it adds latency. The encryption, checksumming, logging, and proxy layers each add overhead. By the time you have wrapped Redis in enough compliance infrastructure to satisfy an auditor, you have added hundreds of microseconds to every cache operation, negating the performance benefit of caching. Second, it adds complexity. You now have five systems (Redis, encryption proxy, logging pipeline, SIEM integration, key management) instead of one. Each system can fail independently. Each requires configuration, monitoring, and maintenance. Third, it is brittle. A gap in any layer means a gap in your compliance posture. If the logging proxy goes down for five minutes, you have five minutes of cache access with no audit trail. If the encryption layer has a bug, you have plaintext data in Redis that you believe is encrypted.

The second approach is to use a cache where compliance is the architecture, not an add-on. This is what Cachee provides. Every entry is signed with three independent PQ signature algorithms at write time. Every read verifies all three signatures before returning the value. Every operation is recorded in a hash-chained, tamper-evident log. Every state transition is authorized and provable. Every entry can be exported as a self-contained Cache Attestation Bundle that an auditor can verify offline.

The critical difference is that the Cachee approach adds zero additional latency for the audit trail because the audit trail IS the storage model. The signatures are computed during the write operation. The verification happens during the read operation. The hash chain is maintained as entries are created and modified. There is no separate audit system to go down, no log pipeline to maintain, no encryption proxy to configure. The compliance evidence is a byproduct of storing data, not a separate operation performed on stored data.

# Redis: data in, bytes out, no proof of anything
$ redis-cli SET user:123:profile '{"name":"Alice","ssn":"123-45-6789"}'
OK
$ redis-cli GET user:123:profile
"{\"name\":\"Alice\",\"ssn\":\"123-45-6789\"}"
# Who read this? When? Was it modified? Prove it. -- Cannot.

# Cachee: data in, verified evidence out
$ cachee-cli SET user:123:profile '{"name":"Alice","ssn":"123-45-6789"}' EX 3600
OK  # PQ-signed, fingerprinted, chain-linked at write time

$ cachee-cli GETVERIFIED user:123:profile
# Returns: value + ML-DSA-65 sig + FALCON-512 sig + SLH-DSA sig + fingerprint
# All 3 signatures verified before value returned

$ cachee-cli AUDITLOG user:123:profile
# Returns: complete hash-chained history from genesis
# Every read, write, state change -- attributed, timestamped, provable

Compliance as Architecture

Bolting compliance onto Redis requires encryption proxies, logging sidecars, SIEM pipelines, key management systems, and custom integrity checks. Each adds latency, complexity, and failure modes. Cachee produces the same evidence -- signatures, fingerprints, audit trails, integrity proofs -- as a byproduct of normal cache operations. Zero additional latency. Zero additional infrastructure. The audit trail is the storage model.

What to Do Monday Morning

If you are reading this and realizing that your cache is a compliance gap, here are five actions you can take this week to start closing it. These are listed in order of urgency, starting with the action that has the most immediate impact on your compliance posture.

Action 1: Inventory What Your Cache Holds

Before you can fix the gap, you need to understand it. Run a data classification exercise on your cache. Enumerate every key pattern in your Redis instance and map each pattern to the type of data it holds. Identify which patterns contain PII, ePHI, financial data, session tokens, or other regulated data. This inventory becomes the scope for your cache compliance project. You may be surprised by what is in there -- most teams discover cached data they did not know existed, from stale session tokens to cached API responses containing customer addresses.

Action 2: Add Cache to Your Data Flow Diagrams

Most data flow diagrams show the client, the API, and the database. The cache is either absent or drawn as a transparent layer that "does not count." Update your diagrams to show the cache as a first-class data store. Draw the data flows in and out. Label the data classifications. Identify the trust boundaries. When your auditor reviews the data flow diagram and asks "what about this cache component," you want to have an answer that is not "we never thought about it."

Action 3: Assess Against Your Compliance Framework

Take the five auditor questions from this post and apply them to your cache. Can you prove integrity? Can you prove who accessed what? Can you reconstruct historical state? Is the data encrypted at the application level? Can you prove deletion? Document the gaps. Map each gap to the specific control requirement in your framework (SOC 2 TSC, HIPAA Technical Safeguards, PCI DSS Requirements, GDPR Articles). This gap assessment becomes the business case for upgrading your cache infrastructure.

Action 4: Evaluate Cache Infrastructure with Compliance Requirements

When you evaluate replacement cache infrastructure, add compliance requirements to your evaluation criteria alongside latency and throughput. Can the cache produce audit evidence natively? Does it support integrity verification? Does it have per-key access controls? Can it prove deletion? Can it produce evidence artifacts that auditors can verify independently? Cachee was built for these requirements. Most caches were not. The evaluation criteria determine the outcome -- if you only evaluate on latency and cost, you will choose a fast cache with no compliance capabilities and face the same gap next audit cycle.

Action 5: Brief Your Auditor Before They Find It

The worst outcome is your auditor discovering the cache compliance gap during the audit. The second-worst outcome is discovering it yourself and having no remediation plan. The best outcome is briefing your auditor proactively: "We identified that our cache infrastructure does not satisfy [specific controls]. Here is our remediation plan with a timeline." Auditors respond well to proactive disclosure with a credible remediation plan. They respond poorly to discovering gaps that the team was unaware of. Brief your auditor, show the gap assessment, present the remediation plan, and establish a timeline for closing the gap.

The cache compliance gap is real, it is widespread, and auditors are actively looking for it. Every company that caches sensitive data -- which is every company that caches anything meaningful -- has this gap unless they have explicitly addressed it. Redis, Memcached, ElastiCache, and every other traditional cache were designed for performance, not compliance. They do what they were designed to do, and they do it well. But they do not produce audit evidence, they do not verify integrity, they do not log access, and they do not prove deletion. If your compliance framework requires these controls -- and SOC 2, HIPAA, GDPR, FedRAMP, and PCI DSS all do -- then your cache is the gap.

The fix is not a logging sidecar or an encryption proxy. The fix is a cache that was designed from the ground up to produce evidence as a byproduct of storing data. That is what Cachee provides: 31-nanosecond reads, 140 Redis commands, drop-in compatibility, and a cryptographic audit trail that satisfies every compliance framework your organization operates under. The performance story gets you deployed. The compliance story gets you retained.

The Bottom Line

Your cache holds the same sensitive data as your database. Your database passes every audit. Your cache fails every audit. This is the biggest compliance gap in your stack, and auditors are now specifically looking for it. The fix is not bolting compliance onto Redis. The fix is a cache where compliance is the architecture. Cachee provides 31ns reads, triple PQ signatures on every entry, hash-chained audit logs, per-key access controls, provable deletion, and self-contained verification bundles -- all native, all zero additional latency, all from a single binary. Close the gap before your auditor finds it.

Your cache is a compliance gap. Redis cannot answer the five auditor questions. Cachee answers all five natively.

Get Started Cache Attestation Docs