Skip to content

Commit ff21ded

Browse files
lmajanogithub-actions[bot]
authored andcommitted
Apply cfformat changes
1 parent 408c096 commit ff21ded

File tree

2 files changed

+57
-25
lines changed

2 files changed

+57
-25
lines changed

system/cache/providers/BoxLangProvider.cfc

+25-17
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,24 @@ component
118118
*/
119119
struct function getStoreMetadataKeyMap(){
120120
return {
121-
"cacheName", "cacheName",
122-
"hits", "hits",
123-
"timeout", "timeout",
124-
"lastAccessTimeout", "lastAccessTimeout",
125-
"created", "created",
126-
"lastAccessed", "lastAccessed",
127-
"metadata", "metadata",
128-
"key", "key",
129-
"isEternal", "isEternal"
121+
"cacheName",
122+
"cacheName",
123+
"hits",
124+
"hits",
125+
"timeout",
126+
"timeout",
127+
"lastAccessTimeout",
128+
"lastAccessTimeout",
129+
"created",
130+
"created",
131+
"lastAccessed",
132+
"lastAccessed",
133+
"metadata",
134+
"metadata",
135+
"key",
136+
"key",
137+
"isEternal",
138+
"isEternal"
130139
};
131140
}
132141

@@ -209,14 +218,13 @@ component
209218
any lastAccessTimeout = "0",
210219
any extra = {}
211220
){
212-
return cache( getConfiguration().cacheName )
213-
.getOrSet(
214-
arguments.objectKey,
215-
arguments.produce,
216-
arguments.timeout,
217-
arguments.lastAccessTimeout,
218-
arguments.extra
219-
);
221+
return cache( getConfiguration().cacheName ).getOrSet(
222+
arguments.objectKey,
223+
arguments.produce,
224+
arguments.timeout,
225+
arguments.lastAccessTimeout,
226+
arguments.extra
227+
);
220228
}
221229

222230
/**

system/cache/providers/boxlang-lib/BoxLangStats.cfc

+32-8
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ component implements="coldbox.system.cache.util.IStats" accessors="true" {
2626
* Get the cache's performance ratio
2727
*/
2828
numeric function getCachePerformanceRatio(){
29-
return getCacheProvider().getCache().getStats().hitRate();
29+
return getCacheProvider()
30+
.getCache()
31+
.getStats()
32+
.hitRate();
3033
}
3134

3235
/**
@@ -50,28 +53,40 @@ component implements="coldbox.system.cache.util.IStats" accessors="true" {
5053
* Get the total cache's garbage collections
5154
*/
5255
numeric function getGarbageCollections(){
53-
return getCacheProvider().getCache().getStats().garbageCollections();
56+
return getCacheProvider()
57+
.getCache()
58+
.getStats()
59+
.garbageCollections();
5460
}
5561

5662
/**
5763
* Get the total cache's eviction count
5864
*/
5965
numeric function getEvictionCount(){
60-
return getCacheProvider().getCache().getStats().evictionCount();
66+
return getCacheProvider()
67+
.getCache()
68+
.getStats()
69+
.evictionCount();
6170
}
6271

6372
/**
6473
* Get the total cache's hits
6574
*/
6675
numeric function getHits(){
67-
return getCacheProvider().getCache().getStats().hits();
76+
return getCacheProvider()
77+
.getCache()
78+
.getStats()
79+
.hits();
6880
}
6981

7082
/**
7183
* Get the total cache's misses
7284
*/
7385
numeric function getMisses(){
74-
return getCacheProvider().getCache().getStats().misses();
86+
return getCacheProvider()
87+
.getCache()
88+
.getStats()
89+
.misses();
7590
}
7691

7792
/**
@@ -80,21 +95,30 @@ component implements="coldbox.system.cache.util.IStats" accessors="true" {
8095
* @return date/time or empty
8196
*/
8297
function getLastReapDatetime(){
83-
return getCacheProvider().getCache().getStats().lastReapDatetime();
98+
return getCacheProvider()
99+
.getCache()
100+
.getStats()
101+
.lastReapDatetime();
84102
}
85103

86104
/**
87105
* Get the total cache's reap count
88106
*/
89107
numeric function getReapCount(){
90-
return getCacheProvider().getCache().getStats().reapCount();
108+
return getCacheProvider()
109+
.getCache()
110+
.getStats()
111+
.reapCount();
91112
}
92113

93114
/**
94115
* When the cache was started
95116
*/
96117
function getStarted(){
97-
return getCacheProvider().getCache().getStats().started();
118+
return getCacheProvider()
119+
.getCache()
120+
.getStats()
121+
.started();
98122
}
99123

100124
}

0 commit comments

Comments
 (0)