In an old project using Servicestack (5.9.2) I could call

Request.RemoveFromCache(CacheClient, cacheKey);

However, now I get the error ‘IRequest’ does not contain a definition for ‘RemoveFromCache’

Did RemoveFromCache move or was it removed.


It was an unnecessary IRequest extension method that just called ClearCaches():

public static void RemoveFromCache(
    this IRequest req, ICacheClient cacheClient, params string[] cacheKeys)

You can use:

Request.GetCacheClient().ClearCaches(cacheKey) //sync
await Request.GetCacheClientAsync().ClearCachesAsync(cacheKey) //async