---
name: "TSCacheRemove"
section: "3ts"
platform: "linux"
package: "trafficserver-dev"
version: "9.2.5+ds-0+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/TSCacheRemove"
---

# TSCacheRemove(3ts)

TSCacheRemove API function

## NAME

TSCacheRemove - TSCacheRemove API function

## SYNOPSIS

```
#include <ts/ts.h>
```

- ***TSAction* TSCacheRemove(*TSCont* contp, *TSCacheKey* key)**

  ## DESCRIPTION

Removes the object corresponding to *key* from the cache.

If the object was removed successfully, the cache calls *contp* back with the event *TS\_EVENT\_CACHE\_REMOVE*. If the object was not found in the cache, the cache calls *contp* back with the event *TS\_EVENT\_CACHE\_REMOVE\_FAILED*.

In both of these callbacks, the user (*contp*) does not have to do anything.  The user does not get any vconnection from the cache, since no data needs to be transferred.  When the cache calls *contp* back with *TS\_EVENT\_CACHE\_REMOVE*, the remove has already been committed.

## COPYRIGHT

2026, dev@trafficserver.apache.org
