goog.storage.ExpiringStorage
Classgoog.storage.ExpiringStorage
> goog.storage.RichStorage
> goog.storage.Storage
goog.storage.ExpiringStorage(mechanism)
Provides a storage with expirning keys.
mechanism
{!goog.storage.mechanism.Mechanism
}
.CREATION_TIME_KEY
[protected] {string
}Metadata key under which the creation time is stored.
.EXPIRATION_TIME_KEY
[protected] {string
}Metadata key under which the expiration time is stored.
.get(key)
Inherited from goog.storage.RichStorage
.
Get an item from the data storage.
key
{string
}
.getCreationTime(wrapper)
Returns the wrapper creation time.
wrapper
{!Object
}
number
|undefined
}
.getExpirationTime(wrapper)
Returns the wrapper expiration time.
wrapper
{!Object
}
number
|undefined
}
.getWrapper(key, opt_expired)
Get an item wrapper (the item and its metadata) from the storage.
key
{string
}
opt_expired
{boolean
=}
Object
|undefined
)}
.isExpired(wrapper)
Checks if the data item has expired.
wrapper
{!Object
}
boolean
}
.mechanism
[protected] {goog.storage.mechanism.Mechanism
}Inherited from goog.storage.Storage
.
The mechanism used to persist key-value pairs.
.remove(key)
Inherited from goog.storage.Storage
.
Remove an item from the data storage.
key
{string
}
.set(key, value, opt_expiration)
Set an item in the storage.
key
{string
}
value
{*}
opt_expiration
{number
=}