mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	wrapping action caching in a set of actions, still not done...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									43b82d1910
								
							
						
					
					
						commit
						5c3374fca5
					
				| @ -702,6 +702,8 @@ var CacheActions = actions.Actions({ | |||||||
| 		// NOTE: progress will only be displayed if .showProgress(..) 
 | 		// NOTE: progress will only be displayed if .showProgress(..) 
 | ||||||
| 		// 		action is available...
 | 		// 		action is available...
 | ||||||
| 		'pre-cache-progress': 3000, | 		'pre-cache-progress': 3000, | ||||||
|  | 
 | ||||||
|  | 		// XXX handler cache..
 | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
| 	// Cache utility method...
 | 	// Cache utility method...
 | ||||||
| @ -807,6 +809,15 @@ var CacheActions = actions.Actions({ | |||||||
| 			this | 			this | ||||||
| 				.clearCache() | 				.clearCache() | ||||||
| 				.preCache(t) }], | 				.preCache(t) }], | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 	toggleHandlerCache: ['System/Action handler cache', | ||||||
|  | 		makeConfigToggler('action-handler-cache',  | ||||||
|  | 			['off', 'on']/*, | ||||||
|  | 			function(state){}*/)], | ||||||
|  | 	resetHanlerCache: ['System/Reset action handler cache', | ||||||
|  | 		function(){ | ||||||
|  | 			delete this.__handler_cache }], | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| var Cache =  | var Cache =  | ||||||
| @ -831,6 +842,11 @@ module.Cache = ImageGridFeatures.Feature({ | |||||||
| 					this.preCache()  | 					this.preCache()  | ||||||
| 				: false | 				: false | ||||||
| 			}], | 			}], | ||||||
|  | 		['start', | ||||||
|  | 			function(){ | ||||||
|  | 				// XXX this breaks loading...
 | ||||||
|  | 				//this.toggleHandlerCache(this.config['action-handler-cache'] || 'on')
 | ||||||
|  | 			}], | ||||||
| 
 | 
 | ||||||
| 		/*/ XXX clear cache when feature/action topology changes... | 		/*/ XXX clear cache when feature/action topology changes... | ||||||
| 		[[ | 		[[ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user