RemoveFromCache

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.

Thanks

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

public static void RemoveFromCache(
    this IRequest req, ICacheClient cacheClient, params string[] cacheKeys)
{
    cacheClient.ClearCaches(cacheKeys);
}

You can use:

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