Up Offline code samples
DevForce Resource Center » 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 September 20, 2012 11:19

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 © 2020 IdeaBlade