Up Offline code samples
DevForce 2010 Resource Center » Code samples » Offline code samples » Code sample: Save and restore encrypted cache state (Console)

Code sample: Save and restore encrypted cache state (Console)

Last modified on August 15, 2012 17:20

This sample shows one means of saving and restoring the EntityManager cache in encrypted format.


Problem

You'd like to save the contents of the EntityManager cache to a file for disconnected use.  You'd also like that file to be secure from prying eyes.

Solution

This solution illustrates how to save the contents of an EntityManager cache to local storage, in encrypted form; and how to restore the saved CacheState to an EntityManager.

See Save and restore using chained streams for a simpler solution to encrypting cache files using stream chaining.

Created by DevForce on January 10, 2011 15:30

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2015 IdeaBlade