I'm just starting to work with ServiceStack.Redis. I can put individual key/values into the cache and get them from the cache. However, I can't seem to get all items or a count of the items in the cache.
Here's the code
using (RedisClient cacheClient = new RedisClient(cacheServer))
{
IRedisTypedClient<CustomerEntity> customerCache = cacheClient.As<CustomerEntity>();
customer = bl.FetchCustomer(customerId);
//cache for two minutes
customerCache.SetEntry(customerId, customer, new TimeSpan(0, 2, 0));
//These all show the count as 0
logger.Debug(customerCache.GetAll().Count);
logger.Debug(cacheClient.GetAll<CustomerEntity>().Count);
var customers = customerCache.GetAll();
logger.Debug("{0} customers in the cache", customers.Count);
}