1+ /**
2+ * @author Jason Dobry <jason.dobry@gmail.com>
3+ * @file angular-data.js
4+ * @version 0.9.0-SNAPSHOT - Homepage <http://angular-data.codetrain.io/>
5+ * @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>
6+ * @license MIT <https://github.com/jmdobry/angular-data/blob/master/LICENSE>
7+ *
8+ * @overview Data store for Angular.js.
9+ */
110require = ( function e ( t , n , r ) { function s ( o , u ) { if ( ! n [ o ] ) { if ( ! t [ o ] ) { var a = typeof require == "function" && require ; if ( ! u && a ) return a ( o , ! 0 ) ; if ( i ) return i ( o , ! 0 ) ; throw new Error ( "Cannot find module '" + o + "'" ) } var f = n [ o ] = { exports :{ } } ; t [ o ] [ 0 ] . call ( f . exports , function ( e ) { var n = t [ o ] [ 1 ] [ e ] ; return s ( n ?n :e ) } , f , f . exports , e , t , n , r ) } return n [ o ] . exports } var i = typeof require == "function" && require ; for ( var o = 0 ; o < r . length ; o ++ ) s ( r [ o ] ) ; return s } ) ( { "QYwGEY" :[ function ( require , module , exports ) {
211( function ( global ) {
312// Copyright 2012 Google Inc.
@@ -2718,7 +2727,23 @@ function defineResource(definition) {
27182727 Resource . prototype = this . defaults ;
27192728 this . definitions [ definition . name ] = new Resource ( this . utils , definition ) ;
27202729
2721- var cache = this . cacheFactory ( 'DS.' + definition . name ) ;
2730+ var _this = this ;
2731+
2732+ var cache = this . cacheFactory ( 'DS.' + definition . name , {
2733+ maxAge : definition . maxAge || null ,
2734+ recycleFreq : definition . recycleFreq || 1000 ,
2735+ cacheFlushInterval : definition . cacheFlushInterval || null ,
2736+ deleteOnExpire : definition . deleteOnExpire || 'none' ,
2737+ onExpire : function ( id ) {
2738+ _this . eject ( definition . name , id ) ;
2739+ } ,
2740+ capacity : Number . MAX_VALUE ,
2741+ storageMode : 'memory' ,
2742+ storageImpl : null ,
2743+ disabled : false ,
2744+ storagePrefix : 'DS.' + definition . name
2745+ } ) ;
2746+
27222747 this . store [ definition . name ] = {
27232748 collection : [ ] ,
27242749 completedQueries : { } ,
@@ -3874,7 +3899,7 @@ module.exports = [function () {
38743899 * @id angular-data
38753900 * @name angular-data
38763901 * @description
3877- * __Version:__ 0.8.1
3902+ * __Version:__ 0.9.0-SNAPSHOT
38783903 *
38793904 * ## Install
38803905 *
@@ -3893,7 +3918,7 @@ module.exports = [function () {
38933918 * Load `dist/angular-data.js` or `dist/angular-data.min.js` onto your web page after Angular.js.
38943919 *
38953920 * #### Manual download
3896- * Download angular-data.0.8.1 .js from the [Releases](https://github.com/jmdobry/angular-data/releases)
3921+ * Download angular-data.0.9.0-SNAPSHOT .js from the [Releases](https://github.com/jmdobry/angular-data/releases)
38973922 * section of the angular-data GitHub project.
38983923 *
38993924 * ## Load into Angular
@@ -4030,4 +4055,4 @@ module.exports = [function () {
40304055 } ;
40314056} ] ;
40324057
4033- } , { "mout/array/contains" :3 , "mout/array/filter" :4 , "mout/array/slice" :7 , "mout/array/sort" :8 , "mout/array/toLookup" :9 , "mout/lang/isEmpty" :14 , "mout/object/deepMixIn" :21 , "mout/object/forOwn" :23 , "mout/object/pick" :25 , "mout/string/makePath" :26 , "mout/string/upperCase" :27 } ] } , { } , [ 53 ] )
4058+ } , { "mout/array/contains" :3 , "mout/array/filter" :4 , "mout/array/slice" :7 , "mout/array/sort" :8 , "mout/array/toLookup" :9 , "mout/lang/isEmpty" :14 , "mout/object/deepMixIn" :21 , "mout/object/forOwn" :23 , "mout/object/pick" :25 , "mout/string/makePath" :26 , "mout/string/upperCase" :27 } ] } , { } , [ 53 ] )
0 commit comments