signumsoftware / framework

Open Source framework for writing data-centric applications using the latest versions of .Net Core, C# (not-nullable), ASP.NET Web API, Typescript (strict), React, D3 and Sql Server or PostgreeSQL
https://www.signumsoftware.com/en/Framework
MIT License
221 stars 84 forks source link

Browser caching for FilePathEmbedded and FilePathEntity (Replacing PR#596) #598

Closed RezaNosratabad closed 1 year ago

RezaNosratabad commented 1 year ago

this PR replaces https://github.com/signumsoftware/framework/pull/596

Browser caching for FilePathEmbedded and FilePathEntity

At a glance, this server and client side change suite enables browser to cache FilePathEmbedded/FilePathEntity image file, that is downloaded by FileImage (or FileImageLine) from the server.

Thanks to the great guidance from @olmobrutall, it eventually is implemented with cache busting pattern.

The age is set to 1 month as default, but it can be customized for each instance of EFP with replacing your own MaxAge function.

Also using new prop ajaxOptions on FileImage and FileImageLine, request cache option can be overridden.