Skip to content
This repository was archived by the owner on Sep 18, 2019. It is now read-only.

Commit

Permalink
2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
shaungrady committed Aug 12, 2016
1 parent 8340dc8 commit 18fd1fd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-http-etag",
"version": "2.0.4",
"version": "2.0.5",
"description": "Angular module allowing easy use of ETags",
"homepage": "https://github.com/shaungrady/angular-http-etag#readme",
"author": "Shaun Grady",
Expand Down
21 changes: 19 additions & 2 deletions release/angular-http-etag.js
Original file line number Diff line number Diff line change
Expand Up @@ -2614,9 +2614,23 @@ function httpEtagHttpDecorator ($delegate, httpEtag) {
etagValueType = typeof etagValue
}

// Plain, cache, or itemCache objects
if (etagValueType === 'object') {
etagCacheConfig.id = etagValue.id
etagCacheConfig.itemKey = etagValue.itemKey || generateCacheItemKey(httpConfig)
var id, itemKey

if (etagValue.isCache) {
id = etagValue.info().id
itemKey = generateCacheItemKey(httpConfig)
} else if (etagValue.isItemCache) {
id = etagValue.info().id
itemKey = etagValue.info().itemKey
} else {
id = etagValue.id
itemKey = etagValue.itemKey || generateCacheItemKey(httpConfig)
}

etagCacheConfig.id = id
etagCacheConfig.itemKey = itemKey
} else if (etagValueType === 'string') {
etagCacheConfig.id = etagValue
etagCacheConfig.itemKey = generateCacheItemKey(httpConfig)
Expand Down Expand Up @@ -2874,6 +2888,7 @@ function httpEtagProvider () {
adaptedCache.info = function adaptedCacheInfo () {
return cacheDefinitions[cacheId]
}
adaptedCache.isCache = true
})

httpEtagService.info = function httpEtagServiceInfo () {
Expand Down Expand Up @@ -2910,6 +2925,8 @@ function httpEtagProvider () {
return itemCacheInfo
}

itemCache.isItemCache = true

return itemCache
}

Expand Down
4 changes: 2 additions & 2 deletions release/angular-http-etag.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/angular-http-etag.min.map

Large diffs are not rendered by default.

0 comments on commit 18fd1fd

Please # to comment.