Skip to content

New Cache Config and LRU GC #1308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
No subclassing
  • Loading branch information
wu-hui committed Jun 7, 2023
commit c4264fd24e2006137325a3e9f7de9e67c6833162
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ class LocalCacheSettings {
private:
friend class FirestoreInternal;
friend class Settings;
friend class PersistentCacheSettings;
friend class MemoryCacheSettings;

LocalCacheSettings() = default;

virtual Kind kind() const = 0;
virtual const LocalCacheSettingsInternal& internal() const = 0;
Expand Down Expand Up @@ -87,7 +91,7 @@ class PersistentCacheSettings final : public LocalCacheSettings {
* cleanup will be attempted.
*
* By default, persistence cache is enabled with a cache size of 100 MB. The
* minimum value is 1 MB.
* minimum value is 1 MB (1 * 1024 * 1024 bytes).
*/
PersistentCacheSettings WithSizeBytes(int64_t size) const;

Expand Down Expand Up @@ -248,7 +252,7 @@ class MemoryLruGCSettings final : public MemoryGarbageCollectorSettings {
* cleanup will be attempted.
*
* By default, memory LRU cache is enabled with a cache size of 100 MB. The
* minimum value is 1 MB.
* minimum value is 1 MB (1 * 1024 * 1024 bytes).
*/
MemoryLruGCSettings WithSizeBytes(int64_t size);

Expand Down