goog.storage.RichStorage
Classgoog.storage.RichStorage
> goog.storage.Storage
goog.storage.RichStorage(mechanism)
Provides a storage for data with attached metadata.
mechanism
{!goog.storage.mechanism.Mechanism
}
.DATA_KEY
[protected] {string
}Metadata key under which the actual data is stored.
goog.storage.RichStorage.Wrapper
ClassWraps a value so metadata can be associated with it. You probably want to use goog.storage.RichStorage.Wrapper.wrapIfNecessary to avoid multiple embeddings. … more
.get(key)
Get an item from the data storage.
key
{string
}
.getWrapper(key)
Get an item wrapper (the item and its metadata) from the storage. WARNING: This returns an Object, which once used to be goog.storage.RichStorage.Wrapper. This is due to the fact that deserialized objects lose type information and it is hard to do proper typecasting in JavaScript. Be sure you know what you are doing when using the returned value.
key
{string
}
Object
|undefined
)}
.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)
Set an item in the data storage.
key
{string
}
value
{*}