Changeset View
Changeset View
Standalone View
Standalone View
src/lib/caching/kshareddatacache.h
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 62 | public: | |||
---|---|---|---|---|---|
77 | * KSharedDataCache to use whatever it feels is the best default for the | 77 | * KSharedDataCache to use whatever it feels is the best default for the | ||
78 | * system. | 78 | * system. | ||
79 | */ | 79 | */ | ||
80 | KSharedDataCache(const QString &cacheName, | 80 | KSharedDataCache(const QString &cacheName, | ||
81 | unsigned defaultCacheSize, | 81 | unsigned defaultCacheSize, | ||
82 | unsigned expectedItemSize = 0); | 82 | unsigned expectedItemSize = 0); | ||
83 | ~KSharedDataCache(); | 83 | ~KSharedDataCache(); | ||
84 | 84 | | |||
85 | KSharedDataCache(const KSharedDataCache &) = delete; | ||||
86 | KSharedDataCache &operator=(const KSharedDataCache &) = delete; | ||||
87 | | ||||
85 | enum EvictionPolicy { | 88 | enum EvictionPolicy { | ||
86 | // The default value for data in our shared memory will be 0, so it is | 89 | // The default value for data in our shared memory will be 0, so it is | ||
87 | // important that whatever we want for the default value is also 0. | 90 | // important that whatever we want for the default value is also 0. | ||
88 | NoEvictionPreference = 0, | 91 | NoEvictionPreference = 0, | ||
89 | EvictLeastRecentlyUsed, | 92 | EvictLeastRecentlyUsed, | ||
90 | EvictLeastOftenUsed, | 93 | EvictLeastOftenUsed, | ||
91 | EvictOldest | 94 | EvictOldest | ||
92 | }; | 95 | }; | ||
▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines |