diff --git a/10/umbraco-cms/reference/cache/updating-cache.md b/10/umbraco-cms/reference/cache/updating-cache.md index d17001879b1..1e734d4d5dc 100644 --- a/10/umbraco-cms/reference/cache/updating-cache.md +++ b/10/umbraco-cms/reference/cache/updating-cache.md @@ -9,7 +9,7 @@ _This section describes how you should be getting/adding/updating/inserting item ## Adding and retrieving items in the cache -The recommended way to put data in and get data out is to use one of the many overloaded methods of: `GetCacheItem`. The `GetCacheItem` methods (all except one) are designed to "Get or Add" to the cache. For example, the following will retrieve an item from the cache and if it doesn't exist will ensure that the item is added to it: +The recommended way to put data in and get data out is to use one of the many overloaded methods of: `GetCacheItem`. The `GetCacheItem` methods (all except one) are designed to "Get or Add" to the cache. The following retrieves an item from the cache and adds it if it doesn't already exist: ```csharp MyObject cachedItem = _appCaches.RuntimeCache.GetCacheItem("MyCacheKey", () => new MyObject()); @@ -22,7 +22,7 @@ Notice 2 things: * The `GetCacheItem` method is strongly typed and * We are supplying a callback method which is used to populate the cache if it doesn't exist. -The example above will retrieve a strongly typed object of `MyObject` from the cache with the key of "MyCacheKey", if the object doesn't exist in the cache a new instance of `MyObject` will be added to it with the same key. +The example above will retrieve a strongly typed object of `MyObject` from the cache with the key of "MyCacheKey". If the object doesn't exist in the cache, a new instance of MyObject `MyObject` be added to it with the same key. There are a couple of overloads of `GetCacheItem` allowing you to customize how your object is cached from cache dependencies to expiration times. @@ -30,7 +30,7 @@ To use this generic implementation, add the `Umbraco.Extensions` namespace to yo ### Retrieving an item from the cache without a callback -One of the overloads of `GetCacheItem` doesn't specify a callback, this will allow you to retrieve an item from the cache without populating it if it doesn't exist. +One of the overloads of `GetCacheItem` doesn't specify a callback. This allows you to retrieve an item from the cache without populating it if it doesn't exist. An example of usage: @@ -43,4 +43,5 @@ where `_appCaches` is injected as type `AppCaches`. Sometimes you might want to put something in the cache without retrieving it. In this case there is an `InsertCacheItem` method. -This method will add or update the cache item specified by the key so if the item already exists in the cache, it will be replaced. +This method will add or update the cache item specified by the key. If the item already exists in the cache, it will be replaced. + diff --git a/12/umbraco-cms/reference/cache/updating-cache.md b/12/umbraco-cms/reference/cache/updating-cache.md index 4192a500792..62c2de3b6b1 100644 --- a/12/umbraco-cms/reference/cache/updating-cache.md +++ b/12/umbraco-cms/reference/cache/updating-cache.md @@ -4,7 +4,7 @@ _This section describes how you should be getting/adding/updating/inserting item ## Adding and retrieving items in the cache -The recommended way to put data in and get data out is to use one of the many overloaded methods of: `GetCacheItem`. The `GetCacheItem` methods (all except one) are designed to "Get or Add" to the cache. For example, the following will retrieve an item from the cache and if it doesn't exist will ensure that the item is added to it: +The recommended way to put data in and get data out is to use one of the many overloaded methods of: `GetCacheItem`. The `GetCacheItem` methods (all except one) are designed to "Get or Add" to the cache. The following retrieves an item from the cache and adds it if it doesn't already exist: ```csharp MyObject cachedItem = _appCaches.RuntimeCache.GetCacheItem("MyCacheKey", () => new MyObject()); @@ -17,7 +17,7 @@ Notice 2 things: * The `GetCacheItem` method is strongly typed and * We are supplying a callback method which is used to populate the cache if it doesn't exist. -The example above will retrieve a strongly typed object of `MyObject` from the cache with the key of "MyCacheKey", if the object doesn't exist in the cache a new instance of `MyObject` will be added to it with the same key. +The example above will retrieve a strongly typed object of `MyObject` from the cache with the key of "MyCacheKey". If the object doesn't exist in the cache, a new instance of MyObject `MyObject` be added to it with the same key. There are a couple of overloads of `GetCacheItem` allowing you to customize how your object is cached from cache dependencies to expiration times. @@ -25,7 +25,7 @@ To use this generic implementation, add the `Umbraco.Extensions` namespace to yo ### Retrieving an item from the cache without a callback -One of the overloads of `GetCacheItem` doesn't specify a callback, this will allow you to retrieve an item from the cache without populating it if it doesn't exist. +One of the overloads of `GetCacheItem` doesn't specify a callback. This allows you to retrieve an item from the cache without populating it if it doesn't exist. An example of usage: @@ -38,4 +38,4 @@ where `_appCaches` is injected as type `AppCaches`. Sometimes you might want to put something in the cache without retrieving it. In this case there is an `InsertCacheItem` method. -This method will add or update the cache item specified by the key so if the item already exists in the cache, it will be replaced. +This method will add or update the cache item specified by the key. If the item already exists in the cache, it will be replaced. diff --git a/13/umbraco-cms/reference/cache/updating-cache.md b/13/umbraco-cms/reference/cache/updating-cache.md index 4192a500792..62c2de3b6b1 100644 --- a/13/umbraco-cms/reference/cache/updating-cache.md +++ b/13/umbraco-cms/reference/cache/updating-cache.md @@ -4,7 +4,7 @@ _This section describes how you should be getting/adding/updating/inserting item ## Adding and retrieving items in the cache -The recommended way to put data in and get data out is to use one of the many overloaded methods of: `GetCacheItem`. The `GetCacheItem` methods (all except one) are designed to "Get or Add" to the cache. For example, the following will retrieve an item from the cache and if it doesn't exist will ensure that the item is added to it: +The recommended way to put data in and get data out is to use one of the many overloaded methods of: `GetCacheItem`. The `GetCacheItem` methods (all except one) are designed to "Get or Add" to the cache. The following retrieves an item from the cache and adds it if it doesn't already exist: ```csharp MyObject cachedItem = _appCaches.RuntimeCache.GetCacheItem("MyCacheKey", () => new MyObject()); @@ -17,7 +17,7 @@ Notice 2 things: * The `GetCacheItem` method is strongly typed and * We are supplying a callback method which is used to populate the cache if it doesn't exist. -The example above will retrieve a strongly typed object of `MyObject` from the cache with the key of "MyCacheKey", if the object doesn't exist in the cache a new instance of `MyObject` will be added to it with the same key. +The example above will retrieve a strongly typed object of `MyObject` from the cache with the key of "MyCacheKey". If the object doesn't exist in the cache, a new instance of MyObject `MyObject` be added to it with the same key. There are a couple of overloads of `GetCacheItem` allowing you to customize how your object is cached from cache dependencies to expiration times. @@ -25,7 +25,7 @@ To use this generic implementation, add the `Umbraco.Extensions` namespace to yo ### Retrieving an item from the cache without a callback -One of the overloads of `GetCacheItem` doesn't specify a callback, this will allow you to retrieve an item from the cache without populating it if it doesn't exist. +One of the overloads of `GetCacheItem` doesn't specify a callback. This allows you to retrieve an item from the cache without populating it if it doesn't exist. An example of usage: @@ -38,4 +38,4 @@ where `_appCaches` is injected as type `AppCaches`. Sometimes you might want to put something in the cache without retrieving it. In this case there is an `InsertCacheItem` method. -This method will add or update the cache item specified by the key so if the item already exists in the cache, it will be replaced. +This method will add or update the cache item specified by the key. If the item already exists in the cache, it will be replaced. diff --git a/14/umbraco-cms/reference/cache/updating-cache.md b/14/umbraco-cms/reference/cache/updating-cache.md index 4192a500792..62c2de3b6b1 100644 --- a/14/umbraco-cms/reference/cache/updating-cache.md +++ b/14/umbraco-cms/reference/cache/updating-cache.md @@ -4,7 +4,7 @@ _This section describes how you should be getting/adding/updating/inserting item ## Adding and retrieving items in the cache -The recommended way to put data in and get data out is to use one of the many overloaded methods of: `GetCacheItem`. The `GetCacheItem` methods (all except one) are designed to "Get or Add" to the cache. For example, the following will retrieve an item from the cache and if it doesn't exist will ensure that the item is added to it: +The recommended way to put data in and get data out is to use one of the many overloaded methods of: `GetCacheItem`. The `GetCacheItem` methods (all except one) are designed to "Get or Add" to the cache. The following retrieves an item from the cache and adds it if it doesn't already exist: ```csharp MyObject cachedItem = _appCaches.RuntimeCache.GetCacheItem("MyCacheKey", () => new MyObject()); @@ -17,7 +17,7 @@ Notice 2 things: * The `GetCacheItem` method is strongly typed and * We are supplying a callback method which is used to populate the cache if it doesn't exist. -The example above will retrieve a strongly typed object of `MyObject` from the cache with the key of "MyCacheKey", if the object doesn't exist in the cache a new instance of `MyObject` will be added to it with the same key. +The example above will retrieve a strongly typed object of `MyObject` from the cache with the key of "MyCacheKey". If the object doesn't exist in the cache, a new instance of MyObject `MyObject` be added to it with the same key. There are a couple of overloads of `GetCacheItem` allowing you to customize how your object is cached from cache dependencies to expiration times. @@ -25,7 +25,7 @@ To use this generic implementation, add the `Umbraco.Extensions` namespace to yo ### Retrieving an item from the cache without a callback -One of the overloads of `GetCacheItem` doesn't specify a callback, this will allow you to retrieve an item from the cache without populating it if it doesn't exist. +One of the overloads of `GetCacheItem` doesn't specify a callback. This allows you to retrieve an item from the cache without populating it if it doesn't exist. An example of usage: @@ -38,4 +38,4 @@ where `_appCaches` is injected as type `AppCaches`. Sometimes you might want to put something in the cache without retrieving it. In this case there is an `InsertCacheItem` method. -This method will add or update the cache item specified by the key so if the item already exists in the cache, it will be replaced. +This method will add or update the cache item specified by the key. If the item already exists in the cache, it will be replaced. diff --git a/15/umbraco-cms/reference/cache/updating-cache.md b/15/umbraco-cms/reference/cache/updating-cache.md index 4192a500792..62c2de3b6b1 100644 --- a/15/umbraco-cms/reference/cache/updating-cache.md +++ b/15/umbraco-cms/reference/cache/updating-cache.md @@ -4,7 +4,7 @@ _This section describes how you should be getting/adding/updating/inserting item ## Adding and retrieving items in the cache -The recommended way to put data in and get data out is to use one of the many overloaded methods of: `GetCacheItem`. The `GetCacheItem` methods (all except one) are designed to "Get or Add" to the cache. For example, the following will retrieve an item from the cache and if it doesn't exist will ensure that the item is added to it: +The recommended way to put data in and get data out is to use one of the many overloaded methods of: `GetCacheItem`. The `GetCacheItem` methods (all except one) are designed to "Get or Add" to the cache. The following retrieves an item from the cache and adds it if it doesn't already exist: ```csharp MyObject cachedItem = _appCaches.RuntimeCache.GetCacheItem("MyCacheKey", () => new MyObject()); @@ -17,7 +17,7 @@ Notice 2 things: * The `GetCacheItem` method is strongly typed and * We are supplying a callback method which is used to populate the cache if it doesn't exist. -The example above will retrieve a strongly typed object of `MyObject` from the cache with the key of "MyCacheKey", if the object doesn't exist in the cache a new instance of `MyObject` will be added to it with the same key. +The example above will retrieve a strongly typed object of `MyObject` from the cache with the key of "MyCacheKey". If the object doesn't exist in the cache, a new instance of MyObject `MyObject` be added to it with the same key. There are a couple of overloads of `GetCacheItem` allowing you to customize how your object is cached from cache dependencies to expiration times. @@ -25,7 +25,7 @@ To use this generic implementation, add the `Umbraco.Extensions` namespace to yo ### Retrieving an item from the cache without a callback -One of the overloads of `GetCacheItem` doesn't specify a callback, this will allow you to retrieve an item from the cache without populating it if it doesn't exist. +One of the overloads of `GetCacheItem` doesn't specify a callback. This allows you to retrieve an item from the cache without populating it if it doesn't exist. An example of usage: @@ -38,4 +38,4 @@ where `_appCaches` is injected as type `AppCaches`. Sometimes you might want to put something in the cache without retrieving it. In this case there is an `InsertCacheItem` method. -This method will add or update the cache item specified by the key so if the item already exists in the cache, it will be replaced. +This method will add or update the cache item specified by the key. If the item already exists in the cache, it will be replaced.