Custom Additions to Keys - Jaxelr/Nancy.RapidCache GitHub Wiki

For certain specific scenarios, the library allows specific behaviors depending on values contained on the NancyContext. Here are the current supported scenarios:

  • Disabling the cache temporarily for a specific key - If we add to any request the query string value of rapidCacheDisabled, it will avoid looking up inside the cache and instead pass through the request, consequently not saving the value on the store.

Sample curl request: curl localhost:53057/CachedResponse?rapidCacheDisabled=true

  • Removing items inside the cache for a specific key - If we add to any request the query string value of rapidCacheRemove, it will Remove any responses on the cache based on that key.

Sample curl request: curl localhost:53057/CachedResponse?rapidCacheRemove=true

In order for this to work, the default cache generator is used, since it ignores the query string keys being sent for these specific scenarios.