saikamesh
saikamesh

Reputation: 4629

Caching data and images in wp7

I searched on google for how to do data(xml) and image caching on windows phone 7, but did not find any luck. Please direct me to the right place from where I can read about caching mechanism in wp7. (FYI : I use HttpWebRequest to make request to the server and receive response as xml).

Thanks in advance!

Upvotes: 0

Views: 3509

Answers (5)

Dylan Vester
Dylan Vester

Reputation: 2726

There is also a really great auto request and caching framework that came out not too long ago. It's called AgFx and it's available on Codeplex and Nuget I believe. I'm on my phone now or else I'd provide links.

Anyway, I've heard AgFx rocks, but personally, I haven't worked with enough to offer comments. Hope that helps.

Upvotes: 1

Artem Zinnatullin
Artem Zinnatullin

Reputation: 4447

For caching images you can use JetImageLoader, I created it for application, where we need to load, cache and show big amount of logos, icons and so on.

It can be used as binding converter, so you should not even change your code! Just update your XAMLs!

Please, check out samples in repository, you'll love it ;)

Features:

  • Caching on disk
  • Caching in memory
  • Fully asynchronous
  • Available as binding converter or programmatically from your code
  • Fully open source, fork and improve it!

Here is the example:

<Image Source="{Binding ImageUrl, Converter={StaticResource MyAppJetImageLoaderConverter}}"/>

P.S. I am sorry, that I copying my answer from another questions, but image caching on windows phone is huge problem and I want to share my solution, so everybody can use it and improve for developers community

Upvotes: 0

Dan
Dan

Reputation: 1571

I know this is an old post, but I found this great class which others might find useful to know about: Kawagoe Toolkit - PersistentImageCache

Upvotes: 2

Sam Basu
Sam Basu

Reputation: 986

you could use the Isolated Storage to cache both your data & images.

Essentially, you could write key-value pairs or entire files (using byte stream) into the sand-boxed Isolated Storage.

See if the two links below help:

Upvotes: 1

AwkwardCoder
AwkwardCoder

Reputation: 25631

You might want to check the WP7Contrib - it provides pattern and implementations for caching transient data on WP7. It might give you some ideas on how you can achieve what you want.

I am a contributor to this OSS project and this is not a case of self publication honest :)

Upvotes: 2

Related Questions