Print Page | Close Window

Local cache

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2358
Printed Date: 24-Jan-2026 at 1:19am


Topic: Local cache
Posted By: DjStitch
Subject: Local cache
Date Posted: 09-Dec-2010 at 7:35am
Hi there.
 
Can i use the local cache file isolated file to upload into a different app, and if not how can i do this, for example how can i make it a xml file without alot of coding. inporting and exporting of a file.



Replies:
Posted By: sbelini
Date Posted: 09-Dec-2010 at 10:33am
Hi DjStitch,
 
You can always save the cache into a file in the local disk and retrieve it at a later time by using SaveCacheState and RestoreCacheState.
You can find additional information in our http://drc.ideablade.com/xwiki/bin/view/Documentation/DisconnectedApplications#HSavingtheCacheContentstoaLocalDiskFile - DevForce Resource Center .
 
sbelini


Posted By: kimj
Date Posted: 09-Dec-2010 at 1:27pm

Since the resource center doesn't (yet) show recent changes to this API I thought I'd chime in that all of the EntityCacheState-related methods allow you to override the default of binary formatted save/read and instead use plain text.  The ECS is in xml, so calling SaveCacheState with the option to save as text will do the trick. 

Uploading into a different app, whether a DevForce application or not, might present challenges, especially if using DevForce or the raw DataContractSerializer - because of problems with "known" types. 



Print Page | Close Window