Can cache in minutes be set in siteproperty and other places?

Can cache in minutes be set in siteproperty and other places?

Thank you very much.

Hi 

The Cache in Minutes applies to several elements, but Site Properties are always available (and for all purposes pre-cached). What are you trying to achieve?

Thank you for reply.         

 It's a bit troublesome to modify cache minutes on the server action           

 If it can be modified directly in places like siteproperty. Is it better.

 It's convenient to think about it, so I asked this question.

Yes you are right but you can use site property for setting cache time

Salman Ansari wrote:

Yes you are right but you can use site property for setting cache time

thank you for your replay.

The problem is that cache in minutes can only enter numbers.. 


Hi le le,

Deciding what's the correct caching threshold is a very sensitive business, that typically is done after the application is up and running and there is data to determine what's the maximum amount of time the cache can be valid. Having it specified in a Site Property might allow you to adjust this number without messing with the code and having to redeploy it again, but would invite people just to try out values without too much thought or context.

If you feel this would be indeed benefit you and the community, I suggest you check if there is already an Idea to allow Cache In Minutes to accept an expression (or maybe just Site Properties) and upvote it (or create it if it doesn't exist yet).

Be aware that if you would create a Site Property for every single place where you have a Cache in Minutes configuration, you likely end up with tons of site properties that you can tweak but with no real context what is being cached and when is it being used.