From 7fc2d9d1ad27350ad52aa5bf6c176d5ff887e57a Mon Sep 17 00:00:00 2001 From: BoD Date: Wed, 9 Apr 2025 18:37:16 +0200 Subject: [PATCH] Remove "incubating" from the name --- CHANGELOG.md | 6 ++++++ README.md | 14 +++++++------- Writerside/cfg/buildprofiles.xml | 4 ++-- Writerside/doc.tree | 6 +++--- Writerside/topics/cache-control.md | 17 +++++++++-------- Writerside/topics/garbage-collection.md | 15 ++++++++------- Writerside/topics/migration-guide.md | 10 +++++----- .../topics/pagination/pagination-manual.md | 4 ++-- .../topics/pagination/pagination-other.md | 11 +++++------ .../pagination/pagination-relay-style.md | 2 +- Writerside/topics/welcome.md | 12 ++++++------ librarian.root.properties | 6 +++--- normalized-cache-incubating/README.md | 1 - normalized-cache-sqlite-incubating/README.md | 1 - normalized-cache-sqlite/README.md | 1 + .../api/android/normalized-cache-sqlite.api | 0 .../api/jvm/normalized-cache-sqlite.api | 0 .../api/normalized-cache-sqlite.klib.api | 2 +- .../build.gradle.kts | 2 +- .../librarian.module.properties | 0 .../sqldelight/record/schema/1.db | Bin .../sqldelight/record/schema/2.db | Bin .../sqldelight/record/schema/3.db | Bin .../src/androidMain/AndroidManifest.xml | 0 .../cache/normalized/sql/ApolloInitializer.kt | 0 .../sql/SqlNormalizedCacheFactory.android.kt | 0 .../internal/factoryImplementations.android.kt | 0 .../sql/SqlNormalizedCacheFactory.apple.kt | 0 .../internal/factoryImplementations.apple.kt | 0 .../cache/normalized/sql/SqlNormalizedCache.kt | 0 .../sql/SqlNormalizedCacheFactory.kt | 0 .../normalized/sql/internal/RecordDatabase.kt | 0 .../sql/internal/RecordSerializer.kt | 0 .../normalized/sql/internal/factoryHelpers.kt | 0 .../sql/internal/factoryImplementations.kt | 0 .../normalized/sql/internal/record/record.sq | 0 .../sqldelight/record/com/migrations/1.sqm | 0 .../sqldelight/record/com/migrations/2.sqm | 0 .../normalized/sql/SqlNormalizedCacheTest.kt | 0 .../cache/normalized/sql/TrimTest.kt | 0 .../sql/SqlNormalizedCacheFactory.jvm.kt | 0 .../sql/internal/factoryImplementations.jvm.kt | 0 normalized-cache/README.md | 1 + .../api/normalized-cache.api | 0 .../api/normalized-cache.klib.api | 2 +- .../build.gradle.kts | 0 .../librarian.module.properties | 0 .../normalized/internal/ConcurrentMap.apple.kt | 0 .../cache/normalized/internal/Lock.apple.kt | 0 .../cache/normalized/ApolloStore.kt | 0 .../normalized/CacheMissLoggingInterceptor.kt | 0 .../cache/normalized/ClientCacheExtensions.kt | 0 .../cache/normalized/ErrorExtensions.kt | 0 .../cache/normalized/FetchPolicy.kt | 0 .../normalized/FetchPolicyInterceptors.kt | 0 .../cache/normalized/GarbageCollection.kt | 0 .../cache/normalized/SimpleApolloStore.kt | 0 .../cache/normalized/api/ApolloCacheHeaders.kt | 0 .../cache/normalized/api/CacheHeaders.kt | 0 .../cache/normalized/api/CacheKey.kt | 0 .../cache/normalized/api/CacheKeyGenerator.kt | 0 .../cache/normalized/api/CacheKeyResolver.kt | 0 .../cache/normalized/api/CacheResolver.kt | 0 .../cache/normalized/api/DataWithErrors.kt | 0 .../normalized/api/EmbeddedFieldsProvider.kt | 0 .../cache/normalized/api/FieldKeyGenerator.kt | 0 .../cache/normalized/api/MaxAgeProvider.kt | 0 .../cache/normalized/api/MetadataGenerator.kt | 0 .../cache/normalized/api/NormalizedCache.kt | 0 .../normalized/api/NormalizedCacheFactory.kt | 0 .../normalized/api/ReadOnlyNormalizedCache.kt | 0 .../cache/normalized/api/Record.kt | 0 .../cache/normalized/api/RecordMerger.kt | 0 .../internal/ApolloCacheInterceptor.kt | 0 .../normalized/internal/CacheBatchReader.kt | 0 .../cache/normalized/internal/ConcurrentMap.kt | 0 .../normalized/internal/DefaultApolloStore.kt | 0 .../cache/normalized/internal/Lock.kt | 0 .../cache/normalized/internal/Normalizer.kt | 0 .../internal/OptimisticNormalizedCache.kt | 0 .../cache/normalized/internal/RecordWeigher.kt | 0 .../cache/normalized/internal/ShouldSkip.kt | 0 .../normalized/internal/WatcherInterceptor.kt | 0 .../normalized/internal/patternToRegex.kt | 0 .../cache/normalized/memory/MemoryCache.kt | 0 .../normalized/memory/internal/LruCache.kt | 0 .../normalized/memory/internal/store/Cache.kt | 0 .../memory/internal/store/CacheBuilder.kt | 0 .../memory/internal/store/LocalCache.kt | 0 .../memory/internal/store/MonotonicTicker.kt | 0 .../memory/internal/store/RemovalCause.kt | 4 ++++ .../normalized/memory/internal/store/Ticker.kt | 0 .../memory/internal/store/Weigher.kt | 0 .../cache/normalized/CacheKeyResolverTest.kt | 0 .../normalized/DefaultRecordMergerTest.kt | 0 .../cache/normalized/MemoryCacheTest.kt | 0 .../cache/normalized/PatternTest.kt | 0 .../cache/normalized/RecordWeigherTest.kt | 0 .../cache/normalized/TestCustomScalar.kt | 0 .../cache/normalized/internal/LruCacheTest.kt | 0 .../cache/normalized/ApolloStore.concurrent.kt | 0 .../cache/normalized/ApolloStore.jsCommon.kt | 0 .../internal/ConcurrentMap.jsCommon.kt | 0 .../cache/normalized/internal/Lock.jsCommon.kt | 0 .../normalized/internal/ConcurrentMap.jvm.kt | 0 .../cache/normalized/internal/Lock.jvm.kt | 0 samples/pagination/README.md | 5 +++-- samples/pagination/manual/README.md | 2 +- settings.gradle.kts | 4 ++-- test-utils/build.gradle.kts | 2 +- tests/cache-control/build.gradle.kts | 2 +- .../cache-variables-arguments/build.gradle.kts | 2 +- tests/defer/build.gradle.kts | 2 +- tests/garbage-collection/build.gradle.kts | 2 +- .../build.gradle.kts | 2 +- tests/migration/build.gradle.kts | 2 +- .../build.gradle.kts | 2 +- tests/models-operation-based/build.gradle.kts | 2 +- tests/models-response-based/build.gradle.kts | 2 +- tests/normalization-tests/build.gradle.kts | 4 ++-- tests/normalized-cache/build.gradle.kts | 4 ++-- tests/number-scalar/build.gradle.kts | 2 +- tests/optimistic-data/build.gradle.kts | 2 +- tests/pagination/build.gradle.kts | 2 +- tests/partial-results/build.gradle.kts | 2 +- tests/schema-changes/build.gradle.kts | 2 +- tests/settings.gradle.kts | 2 +- tests/store-errors/build.gradle.kts | 2 +- 128 files changed, 93 insertions(+), 81 deletions(-) delete mode 100644 normalized-cache-incubating/README.md delete mode 100644 normalized-cache-sqlite-incubating/README.md create mode 100644 normalized-cache-sqlite/README.md rename normalized-cache-sqlite-incubating/api/android/normalized-cache-sqlite-incubating.api => normalized-cache-sqlite/api/android/normalized-cache-sqlite.api (100%) rename normalized-cache-sqlite-incubating/api/jvm/normalized-cache-sqlite-incubating.api => normalized-cache-sqlite/api/jvm/normalized-cache-sqlite.api (100%) rename normalized-cache-sqlite-incubating/api/normalized-cache-sqlite-incubating.klib.api => normalized-cache-sqlite/api/normalized-cache-sqlite.klib.api (99%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/build.gradle.kts (97%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/librarian.module.properties (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/sqldelight/record/schema/1.db (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/sqldelight/record/schema/2.db (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/sqldelight/record/schema/3.db (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/androidMain/AndroidManifest.xml (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/ApolloInitializer.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.android.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.android.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/appleMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.apple.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/appleMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.apple.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCache.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/RecordDatabase.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/RecordSerializer.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryHelpers.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonMain/sqldelight/record/com/apollographql/cache/normalized/sql/internal/record/record.sq (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonMain/sqldelight/record/com/migrations/1.sqm (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonMain/sqldelight/record/com/migrations/2.sqm (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonTest/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheTest.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/commonTest/kotlin/com/apollographql/cache/normalized/sql/TrimTest.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/jvmMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.jvm.kt (100%) rename {normalized-cache-sqlite-incubating => normalized-cache-sqlite}/src/jvmMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.jvm.kt (100%) create mode 100644 normalized-cache/README.md rename normalized-cache-incubating/api/normalized-cache-incubating.api => normalized-cache/api/normalized-cache.api (100%) rename normalized-cache-incubating/api/normalized-cache-incubating.klib.api => normalized-cache/api/normalized-cache.klib.api (99%) rename {normalized-cache-incubating => normalized-cache}/build.gradle.kts (100%) rename {normalized-cache-incubating => normalized-cache}/librarian.module.properties (100%) rename {normalized-cache-incubating => normalized-cache}/src/appleMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.apple.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/appleMain/kotlin/com/apollographql/cache/normalized/internal/Lock.apple.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/ApolloStore.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/CacheMissLoggingInterceptor.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/ClientCacheExtensions.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/ErrorExtensions.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/FetchPolicy.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/FetchPolicyInterceptors.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/GarbageCollection.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/SimpleApolloStore.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/ApolloCacheHeaders.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheHeaders.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKey.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKeyGenerator.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKeyResolver.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheResolver.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/DataWithErrors.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/EmbeddedFieldsProvider.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/FieldKeyGenerator.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/MaxAgeProvider.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/MetadataGenerator.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/NormalizedCache.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/NormalizedCacheFactory.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/ReadOnlyNormalizedCache.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/Record.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/api/RecordMerger.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ApolloCacheInterceptor.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/CacheBatchReader.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/DefaultApolloStore.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/Lock.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/Normalizer.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/OptimisticNormalizedCache.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/RecordWeigher.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ShouldSkip.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/WatcherInterceptor.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/patternToRegex.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/MemoryCache.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/LruCache.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Cache.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/CacheBuilder.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/LocalCache.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/MonotonicTicker.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/RemovalCause.kt (87%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Ticker.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Weigher.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonTest/kotlin/com/apollographql/cache/normalized/CacheKeyResolverTest.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonTest/kotlin/com/apollographql/cache/normalized/DefaultRecordMergerTest.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonTest/kotlin/com/apollographql/cache/normalized/MemoryCacheTest.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonTest/kotlin/com/apollographql/cache/normalized/PatternTest.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonTest/kotlin/com/apollographql/cache/normalized/RecordWeigherTest.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonTest/kotlin/com/apollographql/cache/normalized/TestCustomScalar.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/commonTest/kotlin/com/apollographql/cache/normalized/internal/LruCacheTest.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/concurrentMain/kotlin/com/apollographql/cache/normalized/ApolloStore.concurrent.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/ApolloStore.jsCommon.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.jsCommon.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/internal/Lock.jsCommon.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/jvmMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.jvm.kt (100%) rename {normalized-cache-incubating => normalized-cache}/src/jvmMain/kotlin/com/apollographql/cache/normalized/internal/Lock.jvm.kt (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5e0c2ad..5ad32191 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Next version (unreleased) +- Removing "incubating" from the repository and artifacts name. With a stable API on the horizon, now is a great time to try the library in your projects and give us feedback. + The artifacts are now: + - `com.apollographql.cache:normalized-cache` for the memory cache + - `com.apollographql.cache:normalized-cache-sqlite` for the SQL cache. + + The package names are unchanged. - Records are now rooted per operation type (QUERY_ROOT, MUTATION_ROOT, SUBSCRIPTION_ROOT) (#109) - `ApolloClient.apolloStore` is deprecated in favor of `ApolloClient.store` for consistency. - Individual `ApolloStore` methods no longer accept a `CustomScalarAdapters`. Instead it can be passed to the `ApolloStore` constructor. diff --git a/README.md b/README.md index 4aa21d8c..e23dc459 100644 --- a/README.md +++ b/README.md @@ -7,26 +7,26 @@ [![Discourse](https://img.shields.io/discourse/topics?label=Discourse&server=https%3A%2F%2Fcommunity.apollographql.com&logo=discourse&color=467B95&style=flat-square)](http://community.apollographql.com/new-topic?category=Help&tags=mobile,client) [![Slack](https://img.shields.io/static/v1?label=kotlinlang&message=apollo-kotlin&color=A97BFF&logo=slack&style=flat-square)](https://app.slack.com/client/T09229ZC6/C01A6KM1SBZ) -[![Maven Central](https://img.shields.io/maven-central/v/com.apollographql.cache/normalized-cache-incubating?style=flat-square)](https://central.sonatype.com/namespace/com.apollographql.cache) -[![OSS Snapshots](https://img.shields.io/nexus/s/com.apollographql.cache/normalized-cache-incubating?server=https%3A%2F%2Fs01.oss.sonatype.org&label=oss-snapshots&style=flat-square)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/apollographql/cache/) +[![Maven Central](https://img.shields.io/maven-central/v/com.apollographql.cache/normalized-cache?style=flat-square)](https://central.sonatype.com/namespace/com.apollographql.cache) +[![OSS Snapshots](https://img.shields.io/nexus/s/com.apollographql.cache/normalized-cache?server=https%3A%2F%2Fs01.oss.sonatype.org&label=oss-snapshots&style=flat-square)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/apollographql/cache/) -## 🚀 Apollo Kotlin Normalized Cache Incubating +## 🚀 Apollo Kotlin Normalized Cache -This repository serves as a place to experiment with [Apollo Kotlin](https://github.com/apollographql/apollo-kotlin)'s normalized cache without impacting the main stable repository. +This repository hosts [Apollo Kotlin](https://github.com/apollographql/apollo-kotlin)'s new normalized cache, aiming to replace the main repository version. ## 📚 Documentation See the project website for documentation:
-[https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/) +[https://apollographql.github.io/apollo-kotlin-normalized-cache/](https://apollographql.github.io/apollo-kotlin-normalized-cache/) The Kdoc API reference can be found at:
-[https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc) +[https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc) ## ⚠️ Disclaimer -The incubating version of the normalized cache is not stable and is subject to change. It is recommended to experiment with it in +This version is not yet stable and is subject to change. It is recommended to experiment with it in non-critical projects/modules, or behind a feature flag. In particular, diff --git a/Writerside/cfg/buildprofiles.xml b/Writerside/cfg/buildprofiles.xml index 3b204e53..bc3c429a 100644 --- a/Writerside/cfg/buildprofiles.xml +++ b/Writerside/cfg/buildprofiles.xml @@ -9,10 +9,10 @@ favicon-96x96.png,favicon-192x192.png true GitHub - https://github.com/apollographql/apollo-kotlin-normalized-cache-incubating/ + https://github.com/apollographql/apollo-kotlin-normalized-cache/ true true - https://github.com/apollographql/apollo-kotlin-normalized-cache-incubating/edit/main/Writerside/ + https://github.com/apollographql/apollo-kotlin-normalized-cache/edit/main/Writerside/ custom.css diff --git a/Writerside/doc.tree b/Writerside/doc.tree index fda15c51..b8d91ebf 100644 --- a/Writerside/doc.tree +++ b/Writerside/doc.tree @@ -3,12 +3,12 @@ - - + + diff --git a/Writerside/topics/cache-control.md b/Writerside/topics/cache-control.md index 78527336..d46b9d0e 100644 --- a/Writerside/topics/cache-control.md +++ b/Writerside/topics/cache-control.md @@ -10,7 +10,8 @@ When receiving a response from the server, the [`Cache-Control` HTTP header](htt > Apollo Server can be configured to include the `Cache-Control` header in responses. See the [caching documentation](https://www.apollographql.com/docs/apollo-server/performance/caching/) for more information. -The cache can be configured to store the **expiration date** of the received fields in the corresponding records. To do so, call [`.storeExpirationDate(true)`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/store-expiration-date.html?query=fun%20%3CT%3E%20MutableExecutionOptions%3CT%3E.storeExpirationDate(storeExpirationDate:%20Boolean):%20T), and set your client's cache resolver to [`CacheControlCacheResolver`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-cache-control-cache-resolver/index.html): +The cache can be configured to store the **expiration date** of the received fields in the corresponding records. To do so, call [`.storeExpirationDate(true)`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/store-expiration-date.html?query=fun%20%3CT%3E%20MutableExecutionOptions%3CT%3E.storeExpirationDate(storeExpirationDate:%20Boolean):%20T), and set your client's cache resolver to [ +`CacheControlCacheResolver`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-cache-control-cache-resolver/index.html): ```kotlin val apolloClient = ApolloClient.builder() @@ -29,8 +30,8 @@ val apolloClient = ApolloClient.builder() When storing fields, the cache can also store their **received date**. This date can then be compared to the current date when resolving a field to determine if its age is above its **maximum age**. -To store the **received date** of fields, call [`.storeReceivedDate(true)`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/store-receive-date.html?query=fun%20%3CT%3E%20MutableExecutionOptions%3CT%3E.storeReceivedDate(storeReceivedDate:%20Boolean):%20T), and set your client's cache resolver to [ -`CacheControlCacheResolver`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-cache-control-cache-resolver/index.html): +To store the **received date** of fields, call [`.storeReceivedDate(true)`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/store-receive-date.html?query=fun%20%3CT%3E%20MutableExecutionOptions%3CT%3E.storeReceivedDate(storeReceivedDate:%20Boolean):%20T), and set your client's cache resolver to [ +`CacheControlCacheResolver`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-cache-control-cache-resolver/index.html): ```kotlin val apolloClient = ApolloClient.builder() @@ -45,11 +46,11 @@ val apolloClient = ApolloClient.builder() > Expiration dates and received dates can be both stored to combine server-controlled and client-controlled expiration strategies. -The **maximum age** of fields can be configured either programmatically, or declaratively in the schema. This is done by passing a [`MaxAgeProvider`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-max-age-provider/index.html?query=interface%20MaxAgeProvider) to the `CacheControlCacheResolver`. +The **maximum age** of fields can be configured either programmatically, or declaratively in the schema. This is done by passing a [`MaxAgeProvider`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-max-age-provider/index.html?query=interface%20MaxAgeProvider) to the `CacheControlCacheResolver`. ### Global max age -To set a global maximum age for all fields, pass a [`GlobalMaxAgeProvider`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-global-max-age-provider/index.html?query=class%20GlobalMaxAgeProvider(maxAge:%20Duration)%20:%20MaxAgeProvider) to the `CacheControlCacheResolver`: +To set a global maximum age for all fields, pass a [`GlobalMaxAgeProvider`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-global-max-age-provider/index.html?query=class%20GlobalMaxAgeProvider(maxAge:%20Duration)%20:%20MaxAgeProvider) to the `CacheControlCacheResolver`: ```kotlin cacheResolver = CacheControlCacheResolver(GlobalMaxAgeProvider(1.hours)), @@ -59,7 +60,7 @@ To set a global maximum age for all fields, pass a [`GlobalMaxAgeProvider`](http #### Programmatically -Use a [`SchemaCoordinatesMaxAgeProvider`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-schema-coordinates-max-age-provider/index.html?query=class%20SchemaCoordinatesMaxAgeProvider(maxAges:%20Map%3CString,%20MaxAge%3E,%20defaultMaxAge:%20Duration)%20:%20MaxAgeProvider) to specify a max age per type and/or field: +Use a [`SchemaCoordinatesMaxAgeProvider`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-schema-coordinates-max-age-provider/index.html?query=class%20SchemaCoordinatesMaxAgeProvider(maxAges:%20Map%3CString,%20MaxAge%3E,%20defaultMaxAge:%20Duration)%20:%20MaxAgeProvider) to specify a max age per type and/or field: ```kotlin cacheResolver = CacheControlCacheResolver( @@ -128,7 +129,7 @@ cacheResolver = CacheControlCacheResolver( ## Maximum staleness -If stale fields are acceptable up to a certain value, you can set a maximum staleness duration. This duration is the maximum time that a stale field will be resolved without resulting in a cache miss. To set this duration, call [`.maxStale(Duration)`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/max-stale.html?query=fun%20%3CT%3E%20MutableExecutionOptions%3CT%3E.maxStale(maxStale:%20Duration):%20T) either globally on your client, or per operation: +If stale fields are acceptable up to a certain value, you can set a maximum staleness duration. This duration is the maximum time that a stale field will be resolved without resulting in a cache miss. To set this duration, call [`.maxStale(Duration)`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/max-stale.html?query=fun%20%3CT%3E%20MutableExecutionOptions%3CT%3E.maxStale(maxStale:%20Duration):%20T) either globally on your client, or per operation: ```kotlin val response = client.query(MyQuery()) @@ -139,7 +140,7 @@ val response = client.query(MyQuery()) ### `isStale` -With `maxStale`, it is possible to get data from the cache even if it is stale. To know if the response contains stale fields, you can check [`CacheInfo.isStale`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/-cache-info/is-stale.html): +With `maxStale`, it is possible to get data from the cache even if it is stale. To know if the response contains stale fields, you can check [`CacheInfo.isStale`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/-cache-info/is-stale.html): ```kotlin if (response.cacheInfo?.isStale == true) { diff --git a/Writerside/topics/garbage-collection.md b/Writerside/topics/garbage-collection.md index 14c7451e..b584457f 100644 --- a/Writerside/topics/garbage-collection.md +++ b/Writerside/topics/garbage-collection.md @@ -9,7 +9,7 @@ A field is considered stale if its **received date** is older than its (client c See [](cache-control.md) for more information about staleness. -Stale fields can be removed from the cache by calling the [`ApolloStore.removeStaleFields()`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/remove-stale-fields.html) function. +Stale fields can be removed from the cache by calling the [`ApolloStore.removeStaleFields()`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/remove-stale-fields.html) function. If all fields of a record are stale, the record itself is removed. @@ -20,10 +20,11 @@ Note: when a record is removed, any reference to it will become a [dangling refe A **dangling reference** is a field whose value is a reference to a cache key that does not exist in the cache. This can happen when: -- manually deleting records with [`ApolloStore.remove()`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/-apollo-store/remove.html) + +- manually deleting records with [`ApolloStore.remove()`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/-apollo-store/remove.html) - records get deleted because all their fields are [stale](#stale-fields) -Dangling references can be removed from the cache by calling the [`ApolloStore.removeDanglingReferences()`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/remove-dangling-references.html) function. +Dangling references can be removed from the cache by calling the [`ApolloStore.removeDanglingReferences()`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/remove-dangling-references.html) function. If all fields of a record are dangling references, the record itself is removed. @@ -36,12 +37,12 @@ A record is **unreachable** if there exists no chain of references from the root This can happen when: - data that was previously returned by the server is no longer returned by a subsequent query -- manually adding records with [`ApolloStore.writeFragment()`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/-apollo-store/write-fragment.html) -- manually deleting records with [`ApolloStore.remove()`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/-apollo-store/remove.html) and `cascade = false`: the deleted record could be the only one referencing others +- manually adding records with [`ApolloStore.writeFragment()`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/-apollo-store/write-fragment.html) +- manually deleting records with [`ApolloStore.remove()`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/-apollo-store/remove.html) and `cascade = false`: the deleted record could be the only one referencing others - references get deleted because they're [stale](#stale-fields) -Unreachable records can be removed from the cache by calling the [`ApolloStore.removeUnreachableRecords()`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/remove-unreachable-records.html) function. +Unreachable records can be removed from the cache by calling the [`ApolloStore.removeUnreachableRecords()`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/remove-unreachable-records.html) function. ## `ApolloStore.garbageCollect()` -The [`ApolloStore.garbageCollect()`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/garbage-collect.html) function is a convenience to remove all stale fields, dangling references, and unreachable records from the cache. +The [`ApolloStore.garbageCollect()`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/garbage-collect.html) function is a convenience to remove all stale fields, dangling references, and unreachable records from the cache. diff --git a/Writerside/topics/migration-guide.md b/Writerside/topics/migration-guide.md index 43ea0d2e..9789cf64 100644 --- a/Writerside/topics/migration-guide.md +++ b/Writerside/topics/migration-guide.md @@ -19,12 +19,12 @@ dependencies { implementation("com.apollographql.apollo:apollo-normalized-cache-sqlite") // SQLite cache // With - implementation("com.apollographql.cache:normalized-cache-incubating:%latest_version%") // Memory cache - implementation("com.apollographql.cache:normalized-cache-sqlite-incubating:%latest_version%") // SQLite cache + implementation("com.apollographql.cache:normalized-cache:%latest_version%") // Memory cache + implementation("com.apollographql.cache:normalized-cache-sqlite:%latest_version%") // SQLite cache } ``` -Note: the `com.apollographql.apollo:apollo-normalized-cache-api` artifact no longer exists, the code it contained has been merged into `com.apollographql.cache:normalized-cache-incubating`. +Note: the `com.apollographql.apollo:apollo-normalized-cache-api` artifact no longer exists, the code it contained has been merged into `com.apollographql.cache:normalized-cache`. Then update your imports: @@ -57,7 +57,7 @@ When this library opens an existing database and finds the old schema, it will * {style="warning"} If your application relies on the data stored in the cache, you can manually transfer all the records from the an old database to a new one. -See an example on how to do that [here](https://github.com/apollographql/apollo-kotlin-normalized-cache-incubating/blob/main/tests/migration/src/commonTest/kotlin/MigrationTest.kt#L157). +See an example on how to do that [here](https://github.com/apollographql/apollo-kotlin-normalized-cache/blob/main/tests/migration/src/commonTest/kotlin/MigrationTest.kt#L157). Make sure you thoroughly test migration scenarios before deploying to production. @@ -85,7 +85,7 @@ By default, errors will not replace existing data in the cache. You can change t > The built-in fetch policies treat any missing or error field as a full cache miss (same behavior as previous versions). > -> You can implement your own fetch policy interceptor to handle partial cache reads, as shown in [this example](https://github.com/apollographql/apollo-kotlin-normalized-cache-incubating/blob/main/tests/partial-results/src/commonTest/kotlin/test/CachePartialResultTest.kt#L809). +> You can implement your own fetch policy interceptor to handle partial cache reads, as shown in [this example](https://github.com/apollographql/apollo-kotlin-normalized-cache/blob/main/tests/partial-results/src/commonTest/kotlin/test/CachePartialResultTest.kt#L809). ### Publishing changes to watchers diff --git a/Writerside/topics/pagination/pagination-manual.md b/Writerside/topics/pagination/pagination-manual.md index f58b1de0..84e935e1 100644 --- a/Writerside/topics/pagination/pagination-manual.md +++ b/Writerside/topics/pagination/pagination-manual.md @@ -1,6 +1,6 @@ # Managing pagination manually -Using the [`ApolloStore`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/-apollo-store/index.html) +Using the [`ApolloStore`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/-apollo-store/index.html) APIs, you can update the cache manually whenever you fetch a new page of data. Here's a general outline of how you can do this: @@ -32,4 +32,4 @@ Note that in this simple example, we need to remember the last fetched page, so This can be stored in shared preferences for instance. However in most cases the API can return a "page info" object containing the information needed to fetch the next page, and this can be stored in the cache with the rest of the data. -An example of doing this is available [here](https://github.com/apollographql/apollo-kotlin-normalized-cache-incubating/tree/main/samples/pagination/manual). +An example of doing this is available [here](https://github.com/apollographql/apollo-kotlin-normalized-cache/tree/main/samples/pagination/manual). diff --git a/Writerside/topics/pagination/pagination-other.md b/Writerside/topics/pagination/pagination-other.md index 9390fd4c..4ac49f36 100644 --- a/Writerside/topics/pagination/pagination-other.md +++ b/Writerside/topics/pagination/pagination-other.md @@ -15,7 +15,7 @@ extend type Query @fieldPolicy(forField: "usersPage" paginationArgs: "page") ``` -> This can also be done programmatically by configuring the `ApolloStore` with a [`FieldKeyGenerator`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-field-key-generator/index.html?query=interface%20FieldKeyGenerator) implementation. +> This can also be done programmatically by configuring the `ApolloStore` with a [`FieldKeyGenerator`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-field-key-generator/index.html?query=interface%20FieldKeyGenerator) implementation. With that in place, after fetching the first page, the cache will look like this: @@ -44,7 +44,7 @@ This is because the field key is now the same for all pages and the default merg #### Record merging To fix this, we need to supply the store with a piece of code that can merge the lists in a sensible way. -This is done by passing a [`RecordMerger`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-record-merger/index.html?query=interface%20RecordMerger) to the `ApolloStore` constructor: +This is done by passing a [`RecordMerger`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-record-merger/index.html?query=interface%20RecordMerger) to the `ApolloStore` constructor: ```kotlin object MyFieldMerger : FieldRecordMerger.FieldMerger { @@ -99,7 +99,7 @@ Now let's store in the metadata of each `UserConnection` field the values of the as well as the values of the first and last cursor in its list. This will allow us to insert new pages in the correct position later on. -This is done by passing a [`MetadataGenerator`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-metadata-generator/index.html?query=interface%20MetadataGenerator) to the `ApolloStore` constructor: +This is done by passing a [`MetadataGenerator`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-metadata-generator/index.html?query=interface%20MetadataGenerator) to the `ApolloStore` constructor: ```kotlin class ConnectionMetadataGenerator : MetadataGenerator { @@ -144,8 +144,7 @@ extend type Query @typePolicy(embeddedFields: "usersConnection") extend type UserConnection @typePolicy(embeddedFields: "edges") ``` - -> This can also be done programmatically by configuring the `ApolloStore` with an [`EmbeddedFieldsProvider`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-embedded-fields-provider/index.html?query=interface%20EmbeddedFieldsProvider) implementation. +> This can also be done programmatically by configuring the `ApolloStore` with an [`EmbeddedFieldsProvider`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-embedded-fields-provider/index.html?query=interface%20EmbeddedFieldsProvider) implementation. Now that we have the metadata and embedded fields in place, we can implement the `RecordMerger` (simplified for brevity): @@ -188,4 +187,4 @@ object ConnectionFieldMerger : FieldRecordMerger.FieldMerger { } ``` -A full implementation of `ConnectionFieldMerger` can be found [here](https://github.com/apollographql/apollo-kotlin-normalized-cache-incubating/blob/main/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/RecordMerger.kt#L136). +A full implementation of `ConnectionFieldMerger` can be found [here](https://github.com/apollographql/apollo-kotlin-normalized-cache/blob/main/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/RecordMerger.kt#L136). diff --git a/Writerside/topics/pagination/pagination-relay-style.md b/Writerside/topics/pagination/pagination-relay-style.md index 59a09f80..55604c2c 100644 --- a/Writerside/topics/pagination/pagination-relay-style.md +++ b/Writerside/topics/pagination/pagination-relay-style.md @@ -67,4 +67,4 @@ val apolloStore = ApolloStore( Query `UsersConnection()` to fetch new pages and update the cache, and watch it to observe the full list. -An example of doing this is available [here](https://github.com/apollographql/apollo-kotlin-normalized-cache-incubating/tree/main/samples/pagination/pagination-support). +An example of doing this is available [here](https://github.com/apollographql/apollo-kotlin-normalized-cache/tree/main/samples/pagination/pagination-support). diff --git a/Writerside/topics/welcome.md b/Writerside/topics/welcome.md index c13185fc..5e2fd17e 100644 --- a/Writerside/topics/welcome.md +++ b/Writerside/topics/welcome.md @@ -1,10 +1,10 @@ # Welcome -This repository serves as a place to experiment with [Apollo Kotlin](https://github.com/apollographql/apollo-kotlin)'s normalized cache without impacting the main stable repository. +This repository hosts [Apollo Kotlin](https://github.com/apollographql/apollo-kotlin)'s new normalized cache, aiming to replace the main repository version. ## Use in your project -> The incubating version of the normalized cache is not stable and is subject to change. It is recommended to experiment with it in +> This version is not yet stable and is subject to change. It is recommended to experiment with it in > non-critical projects/modules, or behind a feature flag. > > In particular, @@ -19,10 +19,10 @@ Add the dependencies to your project. // build.gradle.kts dependencies { // For the memory cache - implementation("com.apollographql.cache:normalized-cache-incubating:%latest_version%") - - // For the SQLite cache - implementation("com.apollographql.cache:normalized-cache-sqlite-incubating:%latest_version%") + implementation("com.apollographql.cache:normalized-cache:%latest_version%") + + // For the SQL cache + implementation("com.apollographql.cache:normalized-cache-sqlite:%latest_version%") } ``` diff --git a/librarian.root.properties b/librarian.root.properties index b4d775ee..035ba0ad 100644 --- a/librarian.root.properties +++ b/librarian.root.properties @@ -8,7 +8,7 @@ sonatype.backend=S01 pom.groupId=com.apollographql.cache pom.version=0.0.9-SNAPSHOT -pom.description=Apollo Kotlin Incubating Normalized Cache -pom.vcsUrl=https://github.com/apollographql/apollo-kotlin-normalized-cache-incubating -pom.developer=Apollo Kotlin Incubating Normalized Cache contributors +pom.description=Apollo Kotlin Normalized Cache +pom.vcsUrl=https://github.com/apollographql/apollo-kotlin-normalized-cache +pom.developer=Apollo Kotlin Normalized Cache contributors pom.license=MIT License diff --git a/normalized-cache-incubating/README.md b/normalized-cache-incubating/README.md deleted file mode 100644 index 371b7836..00000000 --- a/normalized-cache-incubating/README.md +++ /dev/null @@ -1 +0,0 @@ -# Module normalized-cache-incubating diff --git a/normalized-cache-sqlite-incubating/README.md b/normalized-cache-sqlite-incubating/README.md deleted file mode 100644 index 9e6bf775..00000000 --- a/normalized-cache-sqlite-incubating/README.md +++ /dev/null @@ -1 +0,0 @@ -# Module normalized-cache-sqlite-incubating diff --git a/normalized-cache-sqlite/README.md b/normalized-cache-sqlite/README.md new file mode 100644 index 00000000..aa0a24ff --- /dev/null +++ b/normalized-cache-sqlite/README.md @@ -0,0 +1 @@ +# Module normalized-cache-sqlite diff --git a/normalized-cache-sqlite-incubating/api/android/normalized-cache-sqlite-incubating.api b/normalized-cache-sqlite/api/android/normalized-cache-sqlite.api similarity index 100% rename from normalized-cache-sqlite-incubating/api/android/normalized-cache-sqlite-incubating.api rename to normalized-cache-sqlite/api/android/normalized-cache-sqlite.api diff --git a/normalized-cache-sqlite-incubating/api/jvm/normalized-cache-sqlite-incubating.api b/normalized-cache-sqlite/api/jvm/normalized-cache-sqlite.api similarity index 100% rename from normalized-cache-sqlite-incubating/api/jvm/normalized-cache-sqlite-incubating.api rename to normalized-cache-sqlite/api/jvm/normalized-cache-sqlite.api diff --git a/normalized-cache-sqlite-incubating/api/normalized-cache-sqlite-incubating.klib.api b/normalized-cache-sqlite/api/normalized-cache-sqlite.klib.api similarity index 99% rename from normalized-cache-sqlite-incubating/api/normalized-cache-sqlite-incubating.klib.api rename to normalized-cache-sqlite/api/normalized-cache-sqlite.klib.api index 53a68fe4..7f22099b 100644 --- a/normalized-cache-sqlite-incubating/api/normalized-cache-sqlite-incubating.klib.api +++ b/normalized-cache-sqlite/api/normalized-cache-sqlite.klib.api @@ -5,7 +5,7 @@ // - Show manifest properties: true // - Show declarations: true -// Library unique name: +// Library unique name: abstract interface com.apollographql.cache.normalized.sql.internal.record/SqlRecordDatabase : app.cash.sqldelight/Transacter { // com.apollographql.cache.normalized.sql.internal.record/SqlRecordDatabase|null[0] abstract val recordQueries // com.apollographql.cache.normalized.sql.internal.record/SqlRecordDatabase.recordQueries|{}recordQueries[0] abstract fun (): com.apollographql.cache.normalized.sql.internal.record/RecordQueries // com.apollographql.cache.normalized.sql.internal.record/SqlRecordDatabase.recordQueries.|(){}[0] diff --git a/normalized-cache-sqlite-incubating/build.gradle.kts b/normalized-cache-sqlite/build.gradle.kts similarity index 97% rename from normalized-cache-sqlite-incubating/build.gradle.kts rename to normalized-cache-sqlite/build.gradle.kts index 7dca1d6d..07032fff 100644 --- a/normalized-cache-sqlite-incubating/build.gradle.kts +++ b/normalized-cache-sqlite/build.gradle.kts @@ -46,7 +46,7 @@ kotlin { getByName("commonMain") { dependencies { api(libs.apollo.api) - api(project(":normalized-cache-incubating")) + api(project(":normalized-cache")) api(libs.sqldelight.runtime) } } diff --git a/normalized-cache-sqlite-incubating/librarian.module.properties b/normalized-cache-sqlite/librarian.module.properties similarity index 100% rename from normalized-cache-sqlite-incubating/librarian.module.properties rename to normalized-cache-sqlite/librarian.module.properties diff --git a/normalized-cache-sqlite-incubating/sqldelight/record/schema/1.db b/normalized-cache-sqlite/sqldelight/record/schema/1.db similarity index 100% rename from normalized-cache-sqlite-incubating/sqldelight/record/schema/1.db rename to normalized-cache-sqlite/sqldelight/record/schema/1.db diff --git a/normalized-cache-sqlite-incubating/sqldelight/record/schema/2.db b/normalized-cache-sqlite/sqldelight/record/schema/2.db similarity index 100% rename from normalized-cache-sqlite-incubating/sqldelight/record/schema/2.db rename to normalized-cache-sqlite/sqldelight/record/schema/2.db diff --git a/normalized-cache-sqlite-incubating/sqldelight/record/schema/3.db b/normalized-cache-sqlite/sqldelight/record/schema/3.db similarity index 100% rename from normalized-cache-sqlite-incubating/sqldelight/record/schema/3.db rename to normalized-cache-sqlite/sqldelight/record/schema/3.db diff --git a/normalized-cache-sqlite-incubating/src/androidMain/AndroidManifest.xml b/normalized-cache-sqlite/src/androidMain/AndroidManifest.xml similarity index 100% rename from normalized-cache-sqlite-incubating/src/androidMain/AndroidManifest.xml rename to normalized-cache-sqlite/src/androidMain/AndroidManifest.xml diff --git a/normalized-cache-sqlite-incubating/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/ApolloInitializer.kt b/normalized-cache-sqlite/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/ApolloInitializer.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/ApolloInitializer.kt rename to normalized-cache-sqlite/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/ApolloInitializer.kt diff --git a/normalized-cache-sqlite-incubating/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.android.kt b/normalized-cache-sqlite/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.android.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.android.kt rename to normalized-cache-sqlite/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.android.kt diff --git a/normalized-cache-sqlite-incubating/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.android.kt b/normalized-cache-sqlite/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.android.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.android.kt rename to normalized-cache-sqlite/src/androidMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.android.kt diff --git a/normalized-cache-sqlite-incubating/src/appleMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.apple.kt b/normalized-cache-sqlite/src/appleMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.apple.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/appleMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.apple.kt rename to normalized-cache-sqlite/src/appleMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.apple.kt diff --git a/normalized-cache-sqlite-incubating/src/appleMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.apple.kt b/normalized-cache-sqlite/src/appleMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.apple.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/appleMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.apple.kt rename to normalized-cache-sqlite/src/appleMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.apple.kt diff --git a/normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCache.kt b/normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCache.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCache.kt rename to normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCache.kt diff --git a/normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.kt b/normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.kt rename to normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.kt diff --git a/normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/RecordDatabase.kt b/normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/RecordDatabase.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/RecordDatabase.kt rename to normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/RecordDatabase.kt diff --git a/normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/RecordSerializer.kt b/normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/RecordSerializer.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/RecordSerializer.kt rename to normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/RecordSerializer.kt diff --git a/normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryHelpers.kt b/normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryHelpers.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryHelpers.kt rename to normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryHelpers.kt diff --git a/normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.kt b/normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.kt rename to normalized-cache-sqlite/src/commonMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.kt diff --git a/normalized-cache-sqlite-incubating/src/commonMain/sqldelight/record/com/apollographql/cache/normalized/sql/internal/record/record.sq b/normalized-cache-sqlite/src/commonMain/sqldelight/record/com/apollographql/cache/normalized/sql/internal/record/record.sq similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonMain/sqldelight/record/com/apollographql/cache/normalized/sql/internal/record/record.sq rename to normalized-cache-sqlite/src/commonMain/sqldelight/record/com/apollographql/cache/normalized/sql/internal/record/record.sq diff --git a/normalized-cache-sqlite-incubating/src/commonMain/sqldelight/record/com/migrations/1.sqm b/normalized-cache-sqlite/src/commonMain/sqldelight/record/com/migrations/1.sqm similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonMain/sqldelight/record/com/migrations/1.sqm rename to normalized-cache-sqlite/src/commonMain/sqldelight/record/com/migrations/1.sqm diff --git a/normalized-cache-sqlite-incubating/src/commonMain/sqldelight/record/com/migrations/2.sqm b/normalized-cache-sqlite/src/commonMain/sqldelight/record/com/migrations/2.sqm similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonMain/sqldelight/record/com/migrations/2.sqm rename to normalized-cache-sqlite/src/commonMain/sqldelight/record/com/migrations/2.sqm diff --git a/normalized-cache-sqlite-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheTest.kt b/normalized-cache-sqlite/src/commonTest/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheTest.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheTest.kt rename to normalized-cache-sqlite/src/commonTest/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheTest.kt diff --git a/normalized-cache-sqlite-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/sql/TrimTest.kt b/normalized-cache-sqlite/src/commonTest/kotlin/com/apollographql/cache/normalized/sql/TrimTest.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/sql/TrimTest.kt rename to normalized-cache-sqlite/src/commonTest/kotlin/com/apollographql/cache/normalized/sql/TrimTest.kt diff --git a/normalized-cache-sqlite-incubating/src/jvmMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.jvm.kt b/normalized-cache-sqlite/src/jvmMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.jvm.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/jvmMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.jvm.kt rename to normalized-cache-sqlite/src/jvmMain/kotlin/com/apollographql/cache/normalized/sql/SqlNormalizedCacheFactory.jvm.kt diff --git a/normalized-cache-sqlite-incubating/src/jvmMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.jvm.kt b/normalized-cache-sqlite/src/jvmMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.jvm.kt similarity index 100% rename from normalized-cache-sqlite-incubating/src/jvmMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.jvm.kt rename to normalized-cache-sqlite/src/jvmMain/kotlin/com/apollographql/cache/normalized/sql/internal/factoryImplementations.jvm.kt diff --git a/normalized-cache/README.md b/normalized-cache/README.md new file mode 100644 index 00000000..635ba6d8 --- /dev/null +++ b/normalized-cache/README.md @@ -0,0 +1 @@ +# Module normalized-cache diff --git a/normalized-cache-incubating/api/normalized-cache-incubating.api b/normalized-cache/api/normalized-cache.api similarity index 100% rename from normalized-cache-incubating/api/normalized-cache-incubating.api rename to normalized-cache/api/normalized-cache.api diff --git a/normalized-cache-incubating/api/normalized-cache-incubating.klib.api b/normalized-cache/api/normalized-cache.klib.api similarity index 99% rename from normalized-cache-incubating/api/normalized-cache-incubating.klib.api rename to normalized-cache/api/normalized-cache.klib.api index 97dc918d..e119a291 100644 --- a/normalized-cache-incubating/api/normalized-cache-incubating.klib.api +++ b/normalized-cache/api/normalized-cache.klib.api @@ -5,7 +5,7 @@ // - Show manifest properties: true // - Show declarations: true -// Library unique name: +// Library unique name: final enum class com.apollographql.cache.normalized/FetchPolicy : kotlin/Enum { // com.apollographql.cache.normalized/FetchPolicy|null[0] enum entry CacheAndNetwork // com.apollographql.cache.normalized/FetchPolicy.CacheAndNetwork|null[0] enum entry CacheFirst // com.apollographql.cache.normalized/FetchPolicy.CacheFirst|null[0] diff --git a/normalized-cache-incubating/build.gradle.kts b/normalized-cache/build.gradle.kts similarity index 100% rename from normalized-cache-incubating/build.gradle.kts rename to normalized-cache/build.gradle.kts diff --git a/normalized-cache-incubating/librarian.module.properties b/normalized-cache/librarian.module.properties similarity index 100% rename from normalized-cache-incubating/librarian.module.properties rename to normalized-cache/librarian.module.properties diff --git a/normalized-cache-incubating/src/appleMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.apple.kt b/normalized-cache/src/appleMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.apple.kt similarity index 100% rename from normalized-cache-incubating/src/appleMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.apple.kt rename to normalized-cache/src/appleMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.apple.kt diff --git a/normalized-cache-incubating/src/appleMain/kotlin/com/apollographql/cache/normalized/internal/Lock.apple.kt b/normalized-cache/src/appleMain/kotlin/com/apollographql/cache/normalized/internal/Lock.apple.kt similarity index 100% rename from normalized-cache-incubating/src/appleMain/kotlin/com/apollographql/cache/normalized/internal/Lock.apple.kt rename to normalized-cache/src/appleMain/kotlin/com/apollographql/cache/normalized/internal/Lock.apple.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/ApolloStore.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/ApolloStore.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/ApolloStore.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/ApolloStore.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/CacheMissLoggingInterceptor.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/CacheMissLoggingInterceptor.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/CacheMissLoggingInterceptor.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/CacheMissLoggingInterceptor.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/ClientCacheExtensions.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/ClientCacheExtensions.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/ClientCacheExtensions.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/ClientCacheExtensions.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/ErrorExtensions.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/ErrorExtensions.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/ErrorExtensions.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/ErrorExtensions.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/FetchPolicy.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/FetchPolicy.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/FetchPolicy.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/FetchPolicy.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/FetchPolicyInterceptors.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/FetchPolicyInterceptors.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/FetchPolicyInterceptors.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/FetchPolicyInterceptors.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/GarbageCollection.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/GarbageCollection.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/GarbageCollection.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/GarbageCollection.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/SimpleApolloStore.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/SimpleApolloStore.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/SimpleApolloStore.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/SimpleApolloStore.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/ApolloCacheHeaders.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/ApolloCacheHeaders.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/ApolloCacheHeaders.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/ApolloCacheHeaders.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheHeaders.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheHeaders.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheHeaders.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheHeaders.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKey.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKey.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKey.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKey.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKeyGenerator.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKeyGenerator.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKeyGenerator.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKeyGenerator.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKeyResolver.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKeyResolver.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKeyResolver.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheKeyResolver.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheResolver.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheResolver.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheResolver.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/CacheResolver.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/DataWithErrors.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/DataWithErrors.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/DataWithErrors.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/DataWithErrors.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/EmbeddedFieldsProvider.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/EmbeddedFieldsProvider.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/EmbeddedFieldsProvider.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/EmbeddedFieldsProvider.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/FieldKeyGenerator.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/FieldKeyGenerator.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/FieldKeyGenerator.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/FieldKeyGenerator.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/MaxAgeProvider.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/MaxAgeProvider.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/MaxAgeProvider.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/MaxAgeProvider.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/MetadataGenerator.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/MetadataGenerator.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/MetadataGenerator.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/MetadataGenerator.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/NormalizedCache.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/NormalizedCache.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/NormalizedCache.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/NormalizedCache.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/NormalizedCacheFactory.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/NormalizedCacheFactory.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/NormalizedCacheFactory.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/NormalizedCacheFactory.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/ReadOnlyNormalizedCache.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/ReadOnlyNormalizedCache.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/ReadOnlyNormalizedCache.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/ReadOnlyNormalizedCache.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/Record.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/Record.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/Record.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/Record.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/RecordMerger.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/RecordMerger.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/api/RecordMerger.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/api/RecordMerger.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ApolloCacheInterceptor.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ApolloCacheInterceptor.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ApolloCacheInterceptor.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ApolloCacheInterceptor.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/CacheBatchReader.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/CacheBatchReader.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/CacheBatchReader.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/CacheBatchReader.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/DefaultApolloStore.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/DefaultApolloStore.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/DefaultApolloStore.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/DefaultApolloStore.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/Lock.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/Lock.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/Lock.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/Lock.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/Normalizer.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/Normalizer.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/Normalizer.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/Normalizer.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/OptimisticNormalizedCache.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/OptimisticNormalizedCache.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/OptimisticNormalizedCache.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/OptimisticNormalizedCache.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/RecordWeigher.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/RecordWeigher.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/RecordWeigher.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/RecordWeigher.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ShouldSkip.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ShouldSkip.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ShouldSkip.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/ShouldSkip.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/WatcherInterceptor.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/WatcherInterceptor.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/WatcherInterceptor.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/WatcherInterceptor.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/patternToRegex.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/patternToRegex.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/patternToRegex.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/internal/patternToRegex.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/MemoryCache.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/MemoryCache.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/MemoryCache.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/MemoryCache.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/LruCache.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/LruCache.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/LruCache.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/LruCache.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Cache.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Cache.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Cache.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Cache.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/CacheBuilder.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/CacheBuilder.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/CacheBuilder.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/CacheBuilder.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/LocalCache.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/LocalCache.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/LocalCache.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/LocalCache.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/MonotonicTicker.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/MonotonicTicker.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/MonotonicTicker.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/MonotonicTicker.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/RemovalCause.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/RemovalCause.kt similarity index 87% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/RemovalCause.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/RemovalCause.kt index 8f3efd62..217d92d3 100644 --- a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/RemovalCause.kt +++ b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/RemovalCause.kt @@ -20,6 +20,10 @@ */ package com.apollographql.cache.normalized.memory.internal.store +import com.apollographql.cache.normalized.memory.internal.store.RemovalCause.EXPLICIT +import com.apollographql.cache.normalized.memory.internal.store.RemovalCause.REPLACED + + /** * The reason why a cached entry was removed. * @param wasEvicted True if entry removal was automatic due to eviction. That is, the cause of removal is neither [EXPLICIT] or [REPLACED]. diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Ticker.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Ticker.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Ticker.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Ticker.kt diff --git a/normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Weigher.kt b/normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Weigher.kt similarity index 100% rename from normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Weigher.kt rename to normalized-cache/src/commonMain/kotlin/com/apollographql/cache/normalized/memory/internal/store/Weigher.kt diff --git a/normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/CacheKeyResolverTest.kt b/normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/CacheKeyResolverTest.kt similarity index 100% rename from normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/CacheKeyResolverTest.kt rename to normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/CacheKeyResolverTest.kt diff --git a/normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/DefaultRecordMergerTest.kt b/normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/DefaultRecordMergerTest.kt similarity index 100% rename from normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/DefaultRecordMergerTest.kt rename to normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/DefaultRecordMergerTest.kt diff --git a/normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/MemoryCacheTest.kt b/normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/MemoryCacheTest.kt similarity index 100% rename from normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/MemoryCacheTest.kt rename to normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/MemoryCacheTest.kt diff --git a/normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/PatternTest.kt b/normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/PatternTest.kt similarity index 100% rename from normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/PatternTest.kt rename to normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/PatternTest.kt diff --git a/normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/RecordWeigherTest.kt b/normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/RecordWeigherTest.kt similarity index 100% rename from normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/RecordWeigherTest.kt rename to normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/RecordWeigherTest.kt diff --git a/normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/TestCustomScalar.kt b/normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/TestCustomScalar.kt similarity index 100% rename from normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/TestCustomScalar.kt rename to normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/TestCustomScalar.kt diff --git a/normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/internal/LruCacheTest.kt b/normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/internal/LruCacheTest.kt similarity index 100% rename from normalized-cache-incubating/src/commonTest/kotlin/com/apollographql/cache/normalized/internal/LruCacheTest.kt rename to normalized-cache/src/commonTest/kotlin/com/apollographql/cache/normalized/internal/LruCacheTest.kt diff --git a/normalized-cache-incubating/src/concurrentMain/kotlin/com/apollographql/cache/normalized/ApolloStore.concurrent.kt b/normalized-cache/src/concurrentMain/kotlin/com/apollographql/cache/normalized/ApolloStore.concurrent.kt similarity index 100% rename from normalized-cache-incubating/src/concurrentMain/kotlin/com/apollographql/cache/normalized/ApolloStore.concurrent.kt rename to normalized-cache/src/concurrentMain/kotlin/com/apollographql/cache/normalized/ApolloStore.concurrent.kt diff --git a/normalized-cache-incubating/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/ApolloStore.jsCommon.kt b/normalized-cache/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/ApolloStore.jsCommon.kt similarity index 100% rename from normalized-cache-incubating/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/ApolloStore.jsCommon.kt rename to normalized-cache/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/ApolloStore.jsCommon.kt diff --git a/normalized-cache-incubating/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.jsCommon.kt b/normalized-cache/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.jsCommon.kt similarity index 100% rename from normalized-cache-incubating/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.jsCommon.kt rename to normalized-cache/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.jsCommon.kt diff --git a/normalized-cache-incubating/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/internal/Lock.jsCommon.kt b/normalized-cache/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/internal/Lock.jsCommon.kt similarity index 100% rename from normalized-cache-incubating/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/internal/Lock.jsCommon.kt rename to normalized-cache/src/jsCommonMain/kotlin/com/apollographql/cache/normalized/internal/Lock.jsCommon.kt diff --git a/normalized-cache-incubating/src/jvmMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.jvm.kt b/normalized-cache/src/jvmMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.jvm.kt similarity index 100% rename from normalized-cache-incubating/src/jvmMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.jvm.kt rename to normalized-cache/src/jvmMain/kotlin/com/apollographql/cache/normalized/internal/ConcurrentMap.jvm.kt diff --git a/normalized-cache-incubating/src/jvmMain/kotlin/com/apollographql/cache/normalized/internal/Lock.jvm.kt b/normalized-cache/src/jvmMain/kotlin/com/apollographql/cache/normalized/internal/Lock.jvm.kt similarity index 100% rename from normalized-cache-incubating/src/jvmMain/kotlin/com/apollographql/cache/normalized/internal/Lock.jvm.kt rename to normalized-cache/src/jvmMain/kotlin/com/apollographql/cache/normalized/internal/Lock.jvm.kt diff --git a/samples/pagination/README.md b/samples/pagination/README.md index 9e0b29b1..2c16fb97 100644 --- a/samples/pagination/README.md +++ b/samples/pagination/README.md @@ -4,8 +4,9 @@ This directory contains samples that demonstrate how to implement pagination wit These are 3 variations of an Android app that uses the [GitHub GraphQL API](https://docs.github.com/en/graphql) to fetch and display a list of repositories. -- [manual](./manual): manually merge pages together and store the result into the cache using the [`ApolloStore`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/-apollo-store/index.html?query=interface%20ApolloStore) API. -- [pagination-support](./pagination-support): use the normalized cache pagination support (`@typePolicy(connectionFields: ...)` / [`ConnectionMetadataGenerator`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-connection-metadata-generator/index.html?query=class%20ConnectionMetadataGenerator(connectionTypes:%20Set%3CString%3E)%20:%20MetadataGenerator), [`ConnectionRecordMerger`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized.api/-connection-record-merger.html?query=val%20ConnectionRecordMerger:%20FieldRecordMerger)) to automatically merge pages together in the cache. +- [manual](./manual): manually merge pages together and store the result into the cache using the [`ApolloStore`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/-apollo-store/index.html?query=interface%20ApolloStore) API. +- [pagination-support](./pagination-support): use the normalized cache pagination support (`@typePolicy(connectionFields: ...)` / [`ConnectionMetadataGenerator`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-connection-metadata-generator/index.html?query=class%20ConnectionMetadataGenerator(connectionTypes:%20Set%3CString%3E)%20:%20MetadataGenerator), [ + `ConnectionRecordMerger`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized.api/-connection-record-merger.html?query=val%20ConnectionRecordMerger:%20FieldRecordMerger)) to automatically merge pages together in the cache. - [pagination-support-with-jetpack-paging](./pagination-support-with-jetpack-paging): demonstrates how to use the normalized cache pagination support along with the [Android Jetpack Paging library](https://developer.android.com/topic/libraries/architecture/paging/v3-overview). Please refer to the `README.md` in each sample for more details. diff --git a/samples/pagination/manual/README.md b/samples/pagination/manual/README.md index b0582cf3..c2d4e476 100644 --- a/samples/pagination/manual/README.md +++ b/samples/pagination/manual/README.md @@ -11,7 +11,7 @@ Note: to execute the app, provide a [GitHub access token](https://developer.gith 1. Gets the current list from the cache 2. Fetches the next page from the network 3. Manually merges the next page with the current list - 4. Updates the cache with the merged list using the [`ApolloStore`](https://apollographql.github.io/apollo-kotlin-normalized-cache-incubating/kdoc/normalized-cache-incubating/com.apollographql.cache.normalized/-apollo-store/index.html?query=interface%20ApolloStore) API + 4. Updates the cache with the merged list using the [`ApolloStore`](https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc/normalized-cache/com.apollographql.cache.normalized/-apollo-store/index.html?query=interface%20ApolloStore) API - Writing to the cache triggers an emission to the watcher, and the `LazyColumn` is updated with the updated list. The gist of it is [here](app/src/main/java/com/example/apollokotlinpaginationsample/repository/Apollo.kt#L43). diff --git a/settings.gradle.kts b/settings.gradle.kts index e6f2a61e..8fff4fe2 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,8 +5,8 @@ pluginManagement { apply(from = "gradle/repositories.gradle.kts") include( - "normalized-cache-incubating", - "normalized-cache-sqlite-incubating", + "normalized-cache", + "normalized-cache-sqlite", "normalized-cache-apollo-compiler-plugin", "test-utils", ) diff --git a/test-utils/build.gradle.kts b/test-utils/build.gradle.kts index d6936bd9..e6062638 100644 --- a/test-utils/build.gradle.kts +++ b/test-utils/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { api(libs.kotlinx.coroutines.test) - api(project(":normalized-cache-incubating")) + api(project(":normalized-cache")) implementation(libs.kotlin.test) } } diff --git a/tests/cache-control/build.gradle.kts b/tests/cache-control/build.gradle.kts index 5f3f0593..8cda4423 100644 --- a/tests/cache-control/build.gradle.kts +++ b/tests/cache-control/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-sqlite-incubating") + implementation("com.apollographql.cache:normalized-cache-sqlite") } } diff --git a/tests/cache-variables-arguments/build.gradle.kts b/tests/cache-variables-arguments/build.gradle.kts index 56960f0e..89b16229 100644 --- a/tests/cache-variables-arguments/build.gradle.kts +++ b/tests/cache-variables-arguments/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } diff --git a/tests/defer/build.gradle.kts b/tests/defer/build.gradle.kts index a53202d6..61f8ee25 100644 --- a/tests/defer/build.gradle.kts +++ b/tests/defer/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { findByName("commonMain")?.apply { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } diff --git a/tests/garbage-collection/build.gradle.kts b/tests/garbage-collection/build.gradle.kts index fa250e09..baf86971 100644 --- a/tests/garbage-collection/build.gradle.kts +++ b/tests/garbage-collection/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-sqlite-incubating") + implementation("com.apollographql.cache:normalized-cache-sqlite") } } diff --git a/tests/include-skip-operation-based/build.gradle.kts b/tests/include-skip-operation-based/build.gradle.kts index dcb409ad..c078e524 100644 --- a/tests/include-skip-operation-based/build.gradle.kts +++ b/tests/include-skip-operation-based/build.gradle.kts @@ -17,7 +17,7 @@ kotlin { findByName("commonMain")?.apply { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } diff --git a/tests/migration/build.gradle.kts b/tests/migration/build.gradle.kts index 1ef4144c..fe327b36 100644 --- a/tests/migration/build.gradle.kts +++ b/tests/migration/build.gradle.kts @@ -17,7 +17,7 @@ kotlin { implementation(libs.apollo.runtime) implementation(libs.apollo.cache) implementation(libs.apollo.cache.sqlite) - implementation("com.apollographql.cache:normalized-cache-sqlite-incubating") + implementation("com.apollographql.cache:normalized-cache-sqlite") } } diff --git a/tests/models-operation-based-with-interfaces/build.gradle.kts b/tests/models-operation-based-with-interfaces/build.gradle.kts index 31690443..9c67c486 100644 --- a/tests/models-operation-based-with-interfaces/build.gradle.kts +++ b/tests/models-operation-based-with-interfaces/build.gradle.kts @@ -17,7 +17,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } diff --git a/tests/models-operation-based/build.gradle.kts b/tests/models-operation-based/build.gradle.kts index 9c731598..5d2df114 100644 --- a/tests/models-operation-based/build.gradle.kts +++ b/tests/models-operation-based/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } diff --git a/tests/models-response-based/build.gradle.kts b/tests/models-response-based/build.gradle.kts index 56a5cf9d..9ea06cd0 100644 --- a/tests/models-response-based/build.gradle.kts +++ b/tests/models-response-based/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } diff --git a/tests/normalization-tests/build.gradle.kts b/tests/normalization-tests/build.gradle.kts index be84761d..4120fa74 100644 --- a/tests/normalization-tests/build.gradle.kts +++ b/tests/normalization-tests/build.gradle.kts @@ -15,13 +15,13 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } getByName("concurrentMain") { dependencies { - implementation("com.apollographql.cache:normalized-cache-sqlite-incubating") + implementation("com.apollographql.cache:normalized-cache-sqlite") } } diff --git a/tests/normalized-cache/build.gradle.kts b/tests/normalized-cache/build.gradle.kts index d1ea258a..0a94f691 100644 --- a/tests/normalized-cache/build.gradle.kts +++ b/tests/normalized-cache/build.gradle.kts @@ -15,13 +15,13 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } getByName("concurrentMain") { dependencies { - implementation("com.apollographql.cache:normalized-cache-sqlite-incubating") + implementation("com.apollographql.cache:normalized-cache-sqlite") } } diff --git a/tests/number-scalar/build.gradle.kts b/tests/number-scalar/build.gradle.kts index a81248e7..0d47ff0e 100644 --- a/tests/number-scalar/build.gradle.kts +++ b/tests/number-scalar/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } diff --git a/tests/optimistic-data/build.gradle.kts b/tests/optimistic-data/build.gradle.kts index 22b9a45a..087d8beb 100644 --- a/tests/optimistic-data/build.gradle.kts +++ b/tests/optimistic-data/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } diff --git a/tests/pagination/build.gradle.kts b/tests/pagination/build.gradle.kts index e2b4fa92..5967234d 100644 --- a/tests/pagination/build.gradle.kts +++ b/tests/pagination/build.gradle.kts @@ -17,7 +17,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-sqlite-incubating") + implementation("com.apollographql.cache:normalized-cache-sqlite") } } diff --git a/tests/partial-results/build.gradle.kts b/tests/partial-results/build.gradle.kts index d8739c61..4d66aa2e 100644 --- a/tests/partial-results/build.gradle.kts +++ b/tests/partial-results/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } diff --git a/tests/schema-changes/build.gradle.kts b/tests/schema-changes/build.gradle.kts index dcb544a5..06479c0c 100644 --- a/tests/schema-changes/build.gradle.kts +++ b/tests/schema-changes/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-incubating") + implementation("com.apollographql.cache:normalized-cache") } } diff --git a/tests/settings.gradle.kts b/tests/settings.gradle.kts index 2677dcf7..fc6793d7 100644 --- a/tests/settings.gradle.kts +++ b/tests/settings.gradle.kts @@ -4,7 +4,7 @@ pluginManagement { includeBuild("../build-logic") } -rootProject.name = "apollo-kotlin-normalized-cache-incubating-tests" +rootProject.name = "apollo-kotlin-normalized-cache-tests" apply(from = "../gradle/repositories.gradle.kts") diff --git a/tests/store-errors/build.gradle.kts b/tests/store-errors/build.gradle.kts index 26bd1e5f..3d79d3a6 100644 --- a/tests/store-errors/build.gradle.kts +++ b/tests/store-errors/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { getByName("commonMain") { dependencies { implementation(libs.apollo.runtime) - implementation("com.apollographql.cache:normalized-cache-sqlite-incubating") + implementation("com.apollographql.cache:normalized-cache-sqlite") } }