Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6561109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:32:48+00:00 2026-05-25T13:32:48+00:00

As mentioned in another question we are using WCF-RIA Services in our project in

  • 0

As mentioned in another question we are using WCF-RIA Services in our project in combination with the silverlight navigation framework. On part is a search function. A search button will navigate to a special search page, putting the search query in the url, which will then trigger a RIA request on the server.

For this request we have enabled the Client output cache using this attribute:

[OutputCache(OutputCacheLocation.Client, duration: 2 * 60)]

Now, sometimes (especially in a demo) our users know, that the underlying datasource has changed and they want to refresh the search to see the current results.

Setting the LoadOperations LoadBehavior didn’t refresh the cache.

For now we have a (partial) solution: we added a special cache counter property to our service. This property is ignored by the service and is only used to work around the cache. Whenever the user clicks on the search button, the cache counter is increased and we work around the cache. If the user navigates back or forward to the search page, the search counter is retrieved from the Url and the request is served by the cache.

The question is now: is there a better way to force a refresh of the client cache?

Additionally: our workaround fails short if the user chooses the browsers refresh button to refresh the search page. In this case the cache counter is still taken from the url and the data is retrieved from the cache instead of the server. I have found no way to detect a refresh from our silverlight client (I have seen one suggestion using a server-side session variable, which is not an option, because our server is completely stateless).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:32:49+00:00Added an answer on May 25, 2026 at 1:32 pm

    We had exact same problem so instead, we declared a common parameter in all ‘Get’ methods called version and version is a random number chosen in starting of silverlight app. When refresh button is clicked, version is changed and it refreshes the cache. When user clicks refresh button on browser, as silverlight will be restarted and a new random version will be chosen. And for every subsequent next/previous version variable will remain same.

    Sample:

    public IQueryable<Products> GetProducts(
        string name, 
        // ignore following
        int version )
    {
       Return ....
    }
    

    Basically different version number identifies a different URL so browser or http client ignores cache and refreshes the results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In an answer to another question it was mentioned that passing XML as a
I have a project using WCF which was working fine, but I moved the
I have created a) a basic application MVVMLight framework. b) another project in the
Ok so in another question something was being discussed, and this link was mentioned:
I was looking at the program at http://www0.us.ioccc.org/1988/westley.c , mentioned in another SO answer
Jeff mentioned the concept of 'Progressive Enhancement' when talking about using JQuery to write
I just saw this mentioned in Stack Overflow question Best WYSIWYG CSS editor and
Another utf-8 related problem I believe... I am using php to update data in
I'm new to iPhone development and I'm having trouble using the 3rd part Kal
In another question - Getting directory listing from SVN for use in ANT dropdown

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.