• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CBIIT / INS-REST-WebService / 25511205793

07 May 2026 05:19PM UTC coverage: 48.98% (+4.5%) from 44.469%
25511205793

Pull #62

github

web-flow
Merge 4fe2bd201 into 61c98c8d0
Pull Request #62: INS-1615

253 of 446 branches covered (56.73%)

Branch coverage included in aggregate %.

182 of 344 new or added lines in 6 files covered. (52.91%)

24 existing lines in 1 file now uncovered.

443 of 975 relevant lines covered (45.44%)

17.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

47.5
/Services/cacheKeyGenerator.js
1
const { hasher } = require('node-object-hash');
2✔
2
let cacheKeyGenerator = {};
2✔
3

4
/**
5
 * Hashes a obj
6
 * @param {Object} obj The obj to hash
7
 */
8
const hash = async (obj) => {
2✔
9
  const hashSortCoerce = hasher({ sort: true, coerce: true });
×
10

11
  return hashSortCoerce.hash(obj);
×
12
}
13

14
cacheKeyGenerator.landingKey = () => {
2✔
15
  return "dr_landing";
×
16
};
17

18
cacheKeyGenerator.datasetsFilterKey = async (searchText, searchFilters) => {
2✔
19
  const filtersHash = await hash(searchFilters);
×
20
  const textHash = await hash(searchText);
×
21
  return `ds_filters_${textHash}_${filtersHash}`;
×
22
};
23

24
cacheKeyGenerator.datasetsCountKey = () => {
2✔
25
  return "ds_counts";
×
26
};
27

28
cacheKeyGenerator.resourcesFilterKey = async (searchText, searchFilters) => {
2✔
NEW
29
  const filtersHash = await hash(searchFilters);
×
NEW
30
  const textHash = await hash(searchText);
×
NEW
31
  return `rs_filters_${textHash}_${filtersHash}`;
×
32
};
33

34
cacheKeyGenerator.resourcesCountKey = () => {
2✔
NEW
35
  return "rs_counts";
×
36
};
37

38
cacheKeyGenerator.filtersKey = (searchText, searchFilters) => {
2✔
39
  return `ds_filters`;
×
40
};
41

42
cacheKeyGenerator.participatingResourcesFiltersKey = () => {
2✔
43
  return "dr_filters";
×
44
};
45

46
cacheKeyGenerator.advancedFiltersKey = () => {
2✔
47
  return "ds_advanced_filters";
×
48
};
49

50
cacheKeyGenerator.datasetKey = (id) => {
2✔
51
  return `ds_item_${id}`;
×
52
};
53

54
cacheKeyGenerator.dataresourceKey = (id) => {
2✔
55
  return `dr_item_${id}`;
×
56
};
57

58
cacheKeyGenerator.resourceKey = (id) => {
2✔
NEW
59
  return `r_item_${id}`;
×
60
};
61

62
cacheKeyGenerator.siteUpdateDateKey = () => {
2✔
63
  return "app_site_update_date";
×
64
};
65

66
cacheKeyGenerator.getAggregationKey = (searchableText) => {
2✔
67
  return `ss_${searchableText}`;
×
68
};
69

70
cacheKeyGenerator.widgetUpdateKey = () => {
2✔
71
  return "widget_update";
×
72
};
73

74
cacheKeyGenerator.glossaryLettersKey = () => {
2✔
75
  return 'glossary_letters';
×
76
};
77

78
module.exports = cacheKeyGenerator;
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc