Caching DateTime

Vote:
 

Hi,

I would like to use StaticallyCacheFor in EPiServer Find.  One of the search filters is DateTime.Now which will cause it to never to hit the cache.

Is there a way around it besides removing the milliseconds/seconds/minutes?

Thanks

#147684
Apr 21, 2016 10:24
Vote:
 

Yes, instead of sending in DateTime.Now() you should send in a calculated "DateTime.Now" based on your last cache time. 

The topic is mentioned here:
http://geta.no/blogg/ascend-15-episerver-find-advanced-developer-session/

#147686
Apr 21, 2016 10:31
Vote:
 
#147687
Apr 21, 2016 10:42
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.