Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Members,

I am building a WCF Service ver 3.5. Here I need to cache data from two different sources and set the expiration at the end of the day 12.00 A.M. Here are the two scenarios.

1. Need to get the data from Oracle database and store it in the cache till the end
of the day i.e at 12.00 A.M. At 12.00 A.M I need to rebuild the cache by getting
the data from the database table.

2. The second scenario is I need to cache the response from the another WCF Service.
This data also should expire at 12.00 A.M. The data is next cached when the WCF
Service is hit for the first time in the day and subsequently new data is
requested.

Below is my implmentation for this.

C#
[AspNetCompatibilityRequirements(RequirementsMode =  AspNetCompatibilityRequriementsMode.Required)]
public class MyService:IService


In the method implemnetation I am trying to implement Caching directly. This is not working as expected.

I have googled to check for WCF Services 3.5 and caching, but most of the details are related to ver 4. Could any one of you provide some inputs on this whether my approach is correct.

Thank you.

Regards,
Deepthi.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900