I’m getting some data in my WCF rest service. I need to cache this data and use it in my website. Is is possible to store the data in wcf rest service & then with Application object I will accesss in global.asax of website?
Share
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.
Inside Application object in Global.asax you can do that, but i assume you’ll be wanting to store data corresponding to the data contract classes ie. the data structures. So why not build a cache manager class that will keep the data in memory and then you can use it to cachwe the data.
While you bring in the data for the first time you can put it into the cache handler class then every time you recieve a request from a client app via WCF service you can first check whether there is any data in the cache handler and return it accordingly.