ETagCacheCollection

zanata/etagCacheCollection~ ETagCacheCollection

The ETagCache collection class

Constructor

new ETagCacheCollection(obj)

Source:
Parameters:
Name Type Description
obj object

the JSON object represented by JSON.stringify() this class.

Methods

add(cache)

Source:

Add a cache into the collection

Parameters:
Name Type Description
cache module:zanata/etagCache~ETagCache

ETagCache

forEach(callback)

Source:

Iterate caches

Parameters:
Name Type Description
callback module:zanata/etagCacheCollection~forEachCallback

the callback function to iterate caches

get(docId, versionId, lang) → {module:zanata/etagCache~ETagCache|undefined}

Source:

Obtain the ETagCache

Parameters:
Name Type Description
docId string

the document id

versionId string

the version id

lang string

the language name

Returns:

ETagCache if any. otherwise undefined.

Type
module:zanata/etagCache~ETagCache | undefined

toJSON() → {object}

Source:

Convert caches to JSON

Returns:

the JSON object

Type
object