In webmethods, it is very simple to implement caching by annotating [WebMethod(CacheDuration…] attribute. Can we create something similar for non-webmethods, such as Static methods?
Any help/tip is appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no built in feature for achieving exactly what you want. You should use
Httpruntime.Cache.It’s not a built in feature but you may achieve something like that using aspect oriented programming (AOP). Caching information using aspects.
In case you’re interested Spring.NET provides AOP