Caching strategy

Hi I’ve got a question about caching strategy.
If with this code I cahe all the “Customers”:

public object Get(CachedCustomers request)
{
	return base.Request.ToOptimizedResultUsingCache(
		this.CacheClient, "urn:customers", () => {
			var service = this.ResolveService<CustomersService>();
			return service.Get(new Customers());
	});
}

When I add or update a single Customer, have I to delete completely the “Customers” cache and reload the new one or there is a better way to handle it? (for example caching each single Customer?)

Yes you have to delete invalidated caches to be able to remove stale caches immediately, as expected.

Thank you mythz, is there a way to monitor or show what actually is in the cache? (for debug purpose)

Every cache is a different datastore and would require a different UI, if you’re using Redis you can use the Redis React Browser we released last week.

For a manual API option we’ve also added wildcard searches to select Caching Providers which you can use to access programmatically.