Packageorg.restfulx.controllers
Classpublic class CacheController
InheritanceCacheController Inheritance flash.events.EventDispatcher

In-memory model data store. This class is responsible for storing models that make it into memory as a result of various ModelsController or other controller actions. It also dispatches relevant CacheUpdateEvent events.

Models are stored in ModelsCollections keyed on model fully qualified class name.


Example
This looks something like this:
    data['com.foobar.models::Project'] = ModelsCollection
   



Public Properties
 PropertyDefined by
  data : Dictionary
model data store
CacheController
Public Methods
 MethodDefined by
  
CacheController
  
create(model:RxModel, serviceProvider:IServiceProvider, opts:Object = null):void
Cache version of the create call.
CacheController
  
destroy(model:RxModel, serviceProvider:IServiceProvider, opts:Object = null):void
Cache version of the destroy call.
CacheController
  
index(models:Object, serviceProvider:IServiceProvider, opts:Object = null):void
Cache version of the index call.
CacheController
  
show(model:RxModel, serviceProvider:IServiceProvider, opts:Object = null):void
Cache version of the show call.
CacheController
  
update(model:RxModel, serviceProvider:IServiceProvider, opts:Object = null):void
Cache version of the update call.
CacheController
Property detail
dataproperty
public var data:Dictionary

model data store

Constructor detail
CacheController()constructor
public function CacheController(state:ModelsMetadata)

Parameters
state:ModelsMetadata — computed model metadata
Method detail
create()method
public function create(model:RxModel, serviceProvider:IServiceProvider, opts:Object = null):void

Cache version of the create call. This dispatches create update event.

Parameters
model:RxModel — unmarshalled model
 
serviceProvider:IServiceProvider — the provider that is this operation was perfomed by
 
opts:Object (default = null) — for extra processing
destroy()method 
public function destroy(model:RxModel, serviceProvider:IServiceProvider, opts:Object = null):void

Cache version of the destroy call. This dispatches destroy update event and cleans up any other model references.

Parameters
model:RxModel — unmarshalled model
 
serviceProvider:IServiceProvider — the provider that is this operation was perfomed by
 
opts:Object (default = null) — for extra processing
index()method 
public function index(models:Object, serviceProvider:IServiceProvider, opts:Object = null):void

Cache version of the index call. This dispatches index update event.

Parameters
models:Object — unmarshalled models
 
serviceProvider:IServiceProvider — the provider that is this operation was perfomed by
 
opts:Object (default = null) — for extra processing
show()method 
public function show(model:RxModel, serviceProvider:IServiceProvider, opts:Object = null):void

Cache version of the show call. This dispatches show update event.

Parameters
model:RxModel — unmarshalled model
 
serviceProvider:IServiceProvider — the provider that is this operation was perfomed by
 
opts:Object (default = null) — for extra processing
update()method 
public function update(model:RxModel, serviceProvider:IServiceProvider, opts:Object = null):void

Cache version of the update call. This dispatches update update event.

Parameters
model:RxModel — unmarshalled model
 
serviceProvider:IServiceProvider — the provider that is this operation was perfomed by
 
opts:Object (default = null) — for extra processing