using Connected.Entities.Caching; namespace Common.Types.TaxRates; /// /// This is the contract for the typed cache. Using contracts for /// caching is useful when writing unit tests so a developer /// can mock the entire cache. /// internal interface ITaxRateCache : IEntityCacheClient { } /// /// Cache for the entity. /// /// /// stores the entire set /// of records in the database. This is useful for data which doesn't change /// frequently because invalidating it ofter can have performance penalties. /// The platform knows how to load and invalidate the entity so developer /// doesn't nedd to write any code at all. /// internal sealed class TaxRateCache : EntityCacheClient, ITaxRateCache { public TaxRateCache(IEntityCacheContext context) : base(context, TaxRate.CacheKey) { } }