Skip to content

Commit 7e51d56

Browse files
amabluea-maurice
authored andcommitted
Updated signature of ServerCache, as not all implementations will be able to
return a value they have locally cached. PiperOrigin-RevId: 308092845
1 parent 60bd867 commit 7e51d56

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

database/src/desktop/persistence/in_memory_persistence_storage_engine.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void InMemoryPersistenceStorageEngine::RemoveAllUserWrites() {
7676
VerifyInTransaction();
7777
}
7878

79-
const Variant& InMemoryPersistenceStorageEngine::ServerCache(const Path& path) {
79+
Variant InMemoryPersistenceStorageEngine::ServerCache(const Path& path) {
8080
return VariantGetChild(&server_cache_, path);
8181
}
8282

database/src/desktop/persistence/in_memory_persistence_storage_engine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class InMemoryPersistenceStorageEngine : public PersistenceStorageEngine {
7777
//
7878
// @param path The path at which to load the data.
7979
// @return The data that was loaded.
80-
const Variant& ServerCache(const Path& path) override;
80+
Variant ServerCache(const Path& path) override;
8181

8282
// Overwrite the server cache at the given path with the given data.
8383
//

database/src/desktop/persistence/persistence_storage_engine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class PersistenceStorageEngine {
133133
//
134134
// @param path The path at which to load the data.
135135
// @return The data that was loaded.
136-
virtual const Variant& ServerCache(const Path& path) = 0;
136+
virtual Variant ServerCache(const Path& path) = 0;
137137

138138
// Overwrite the server cache at the given path with the given data.
139139
//

0 commit comments

Comments
 (0)