new KmlElementsFactoryCached()
More complex factory, which retrieves the values from cache and in case the value isn't present there it
stores the value in cache.
Methods
(static) applicationWide() → {KmlElementsFactoryCached}
It returns application wide instance of the factory.
Returns:
Singleton instance of factory for Application.
all(element) → {Array.<KmlObject>}
It adds caching functionality on top of the KmlElementsFactory all method.
Parameters:
Name | Type | Description |
---|---|---|
element |
KmlObject | Element whose children are considered |
- Source:
- See:
-
- KmlElementsFactory.prototype.all
Returns:
All objects among the elements children
- Type
- Array.<KmlObject>
any(element, options) → {KmlObject|null}
It adds caching functionality on top of the KmlElementsFactory any method.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
element |
KmlObject | Element whose children are considered | ||||||
options |
Object |
Properties
|
- Source:
- See:
-
- KmlElementsFactory.prototype.any
Returns:
KmlObject if there is one with the passed in name.
- Type
- KmlObject | null
cacheKey(node, prefix) → {String}
It creates cache key based on the node. In case the node doesn't have any id, it also creates id for this
element. This id is used for storing the value in the cache.
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | Node for which generate the key. |
prefix |
String | undefined | Prefix for the level |
Returns:
Value representing the key.
- Type
- String
specific(element, options)
It adds caching functionality on top of the KmlElementsFactory specific method.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
element |
KmlObject | Element whose children are considered | |||||||||
options |
Object |
Properties
|
- Source:
- See:
-
- KmlElementsFactory.prototype.specific
Returns:
Relevant value.