I am trying to utilise caching on an MVC4 project and I have the following attribute set on my homepage:
[OutputCache(Location=OutputCacheLocation.ServerAndClient,Duration=14400)]
This works fine, however the duration is causing me an issue. What I need is for the cache to expire on the start of a new day (midnight each day). I could set the duration to be 24 hours however this does not solve my problem with my page having new content on the start of each day. I have explored the vary by param method and I understand that I can append the date to the URL but this is very messy. Does anyone know an alternative?
Thanks in advance