You need to upgrade your Flash Player

This is replaced by the Flash content.

Place your alternate content here and users without the Flash plugin or with Javascript turned off will see this. Content here allows you to leave out noscript tags. Include a link to bypass the detection if you wish.

com.gaiaframework.core.CacheManager

The CacheManager modification to the open-source Gaia Flash Framework provides two basic features:

  1. Automated asset storage & retrieval within a Dictionary structure; which can reduce secondary load times to zero.
  2. A mechanism for preloading multiple branches and their related assets during idle bandwidth.

To make the most of the demo, use a proxy tool like Charles or Safari's Actvity viewer to see how the caching utilizes bandwidth.

 

API

Gaia.api.cacheBranches( $braches:Array );

  • Pass an array of branches in that will preload and cache their assets when the framework has idle bandwidth.
  • If a Gaia.api.goto( branch ) is called while caching is in progress, the caching load will be canceled and the new branch will be given priority.
  • After the new branch is loaded, caching will be resumed.

Gaia.api.interruptCaching( );

  • Interrupt caching to clear the bandwidth pipeline.
  • resumeCaching will need to be called before caching will be enabled again.

Gaia.api.resumeCaching( );

  • Enable caching after an interruptCaching( ) call.

Gaia.api.clearCache( );

  • Creates a new cache dictionary and sets the old one to null.
  • Destroy all non-active assets.

site.xml and Dynamic Externalized Assets :: cache='true'

  • Individual assets/pages can also be cached via the site.xml or asset xml by adding cache='true' to the asset node.

 

Notes

50+ edits were made to the com.gaiaframework packages to enable the CacheManager. A project wide search on 'cacheEdit' within the project files will show all the edits.

Core idea is based on adding a new flow, Gaia.CACHE. When caching pages/swfs, it is very important to garbage collect within those assets. Pages will never be destroyed, but will rather rely on calling transitionIn and transitionOut - potentially several times in a browsing session.

Many thanks to Steven Sacks, Gaia's author, for creating and innovating such a great framework. Ideally this modification will be integrated with the trunk in some form or fashion for the community. Integration would also alleviate the need for others (including myself!) to merge this feature edit every time a new and awesome update to Gaia is released. ;)

 

Download source