Closed sag3ll0 closed 6 years ago
Nothing, it will just work. This will prevent the key to be generated by serialisation. However, your backend will still be called and the item need to be read from your data store.
If you want to protect your backend, you need to implemented your own ITimedETagQueryProvider
to check with database whether an item has changed or not.
As this chart shows, implementing ICacheResource has some but not all benefits:
Thanks for response. I try debug generate etag by implementing ICacheResource, and this not execute method GetTimedETag in baseDto.
Does not?? If it does not it could be a bug.
If you are using default extractor, this is the line where it extracts the ETag: https://github.com/aliostad/CacheCow/blob/master/src/CacheCow.Server/ETag/DefaultTimedETagExtractor.cs#L25
Please let me know if you are having issue, as I said it could be a bug or misconfiguration.
Maybe is not bug, maybe i don't add somewhere something, I use webapi 2, with autofac.
for work GetTimedETag need add ViewModelType in attribute? [HttpCache(DefaultExpirySeconds = 0, ViewModelType = typeof(Car))]
Not really if you are not providing your own extractor.
what was the problem??
@sag3ll0 can you please explain what the problem was? This helps others that might experience your problem. Thanks
Hi, I try implement ICacheResource
But i don't understand what need to next. I use Autofac as DI. BaseDto is base class for CarDto and PlaneDto (i don't want write GetTimedETag in each chield class, becouse it will be same).