HttpWebRequest class CachePolicy not working.

Hi There,

I am new to C#, and working with HttpWebRequest class. I am testing webrequest's cache policy. But after some test cases it seems that cache policy is not working properly. I am checking IsFromCache property, and it every time gives false value.

Is there something i am missing?, or can anyone give an example which gives proper values of cache policy.



  • MilanLakhaniMilanLakhani USMember ✭✭

    I am testing the same in xamarin.ios project, and wanted to make business logic same for the both platform. So i want to call web-services from shared classes and that can be used by both platforms.

    Also i want to achieve caching mechanism which can also be used commonly. So i am using HttpWebRequest class for webservice calling and its caching mechanism for caching the data.

  • MilanLakhaniMilanLakhani USMember ✭✭

    I have checked mono doc comment on that shows
    MONOTODO: "Implement the caching system. Currently always returns a policy with the NoCacheNoStore level",

    How to get rid of this ?
    Or this is bug of Xamarin?
    Or Xamarin has not implemented yet?

    @adamkemp : Any suggestion?

  • adamkempadamkemp USInsider, Developer Group Leader mod

    Sorry, I don't know anything about this.

Sign In or Register to comment.