Skip to content

Commit a2a695f

Browse files
loransjudd
loran
authored andcommitted
allow subclasses to read cache entry count.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=165002367
1 parent 7069a74 commit a2a695f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

library/src/main/java/com/bumptech/glide/util/LruCache.java

+7
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ protected int getSize(Y item) {
5555
return 1;
5656
}
5757

58+
/**
59+
* Returns the number of entries stored in cache.
60+
*/
61+
protected int getCount() {
62+
return cache.size();
63+
}
64+
5865
/**
5966
* A callback called whenever an item is evicted from the cache. Subclasses can override.
6067
*

0 commit comments

Comments
 (0)