You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Memory Cache](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack/Caching/MemoryCacheClient.cs) - Useful for single host web services without needing any infrastructure dependencies.
11
-
*[Redis](https://github.com/ServiceStack/ServiceStack.Redis) - A fast key-value store with non-volatile persistent storage and support for rich comp-sci data structures.
12
-
*[OrmLiteCacheClient](https://www.nuget.org/packages/ServiceStack.Server) - Supports all [OrmLite's RDBMS providers](https://github.com/ServiceStack/ServiceStack.OrmLite/#download) for using an existing RDBMS as a distributed cache.
13
-
*[Memcached](https://nuget.org/packages/ServiceStack.Caching.Memcached) - The original, tried and tested distributed memory caching provider.
14
-
*[Aws DynamoDB](https://www.nuget.org/packages/ServiceStack.Aws/) - Uses Amazon's Dynamo DB backend hosted on Amazon Web Services
15
-
*[Azure Table Storage](/azure#virtual-filesystem-backed-by-azure-blob-storage) - Uses Azure Table Storage for when your application is hosted on Azure.
10
+
*[Memory Cache](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack/Caching/MemoryCacheClient.cs) - Useful for single host web services without needing any infrastructure dependencies.
11
+
*[Redis](https://github.com/ServiceStack/ServiceStack.Redis) - A fast key-value store with non-volatile persistent storage and support for rich comp-sci data structures.
12
+
*[OrmLiteCacheClient](https://www.nuget.org/packages/ServiceStack.Server) - Supports all [OrmLite's RDBMS providers](https://github.com/ServiceStack/ServiceStack.OrmLite/#download) for using an existing RDBMS as a distributed cache.
13
+
*[Memcached](https://nuget.org/packages/ServiceStack.Caching.Memcached) - The original, tried and tested distributed memory caching provider.
14
+
*[Aws DynamoDB](https://www.nuget.org/packages/ServiceStack.Aws/) - Uses Amazon's Dynamo DB backend hosted on Amazon Web Services
15
+
*[Azure Table Storage](/azure#virtual-filesystem-backed-by-azure-blob-storage) - Uses Azure Table Storage for when your application is hosted on Azure.
@@ -169,9 +171,9 @@ There exists a class named [UrnId](https://github.com/ServiceStack/ServiceStack/
169
171
```csharp
170
172
varcacheKey="some_unique_key";
171
173
//Cache should be deleted in 1h
172
-
varexpireInTimespan=newTimeSpan(1, 0, 0);
174
+
varexpireInTimeSpan=newTimeSpan(1, 0, 0);
173
175
returnbase.Request.ToOptimizedResultUsingCache(
174
-
base.Cache, cacheKey, expireInTimespan, ...)
176
+
base.Cache, cacheKey, expireInTimeSpan, ...)
175
177
```
176
178
177
179
## Delete cached responses
@@ -180,8 +182,8 @@ If now for example an order gets updated and the order was cached before the upd
180
182
181
183
Sotherearetwooptions:
182
184
183
-
-Use**timebased**caching (andexpirecacheearlier)
184
-
-Cacheon**validity**
185
+
*Use**timebased**caching (andexpirecacheearlier)
186
+
*Cacheon**validity**
185
187
186
188
:::info
187
189
Whenthecacheisbasedon **validity** thecachesareinvalidatedmanually (e.g. when a user modified his profile, > clear his cache) which means you always get the latest version and you never need to hit the database again to rehydrate the cache if it hasn't changed, which will save resources
@@ -201,12 +203,12 @@ public class CachedOrdersService : Service
AlivedemooftheICacheClientisavailablein [TheServiceStack.Northwind'sexampleproject](https://northwind.netcore.io/). Here are some requests to cached services:
0 commit comments