Add TTL caching docs + announcement blog + changelog#2878
Add TTL caching docs + announcement blog + changelog#2878atharvadeosthale wants to merge 2 commits intomainfrom
Conversation
Appwrite WebsiteProject ID: Website (appwrite/website)Project ID: Tip Preview deployments create instant URLs for every branch and commit |
Greptile SummaryThis PR introduces the TTL-based list response caching feature for Appwrite Databases, adding an announcement blog post, a changelog entry, and documentation sections to the rows and pagination pages. The content is accurate and well-structured; remaining findings are minor P2 style items in the blog post. Confidence Score: 5/5Safe to merge; all findings are P2 documentation polish items with no correctness or data-integrity risk. All identified issues are minor P2 style suggestions — a missing Server SDK callout in the blog purge example and the absence of a Beta label in the docs pages. No logic errors, broken links, or data-integrity issues were found. src/routes/blog/post/announcing-list-cache-ttl/+page.markdoc — purge example and Beta disclaimer. Important Files Changed
Reviews (2): Last reviewed commit: "remove beta" | Re-trigger Greptile |
| {% multicode %} | ||
| ```client-web | ||
| import { Client, Query, TablesDB } from "appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") | ||
| .setProject("<PROJECT_ID>"); | ||
|
|
||
| const tablesDB = new TablesDB(client); | ||
|
|
||
| const rows = await tablesDB.listRows({ | ||
| databaseId: "<DATABASE_ID>", | ||
| tableId: "<TABLE_ID>", | ||
| queries: [ | ||
| Query.equal('title', 'Avatar') | ||
| ], | ||
| ttl: 60 // Cache for 60 seconds | ||
| }); | ||
| ``` | ||
| ```client-flutter | ||
| import 'package:appwrite/appwrite.dart'; | ||
|
|
||
| void main() async { | ||
| final client = Client() | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") | ||
| .setProject("<PROJECT_ID>"); | ||
|
|
||
| final tablesDB = TablesDB(client); | ||
|
|
||
| final rows = await tablesDB.listRows( | ||
| databaseId: '<DATABASE_ID>', | ||
| tableId: '<TABLE_ID>', | ||
| queries: [ | ||
| Query.equal('title', 'Avatar') | ||
| ], | ||
| ttl: 60, // Cache for 60 seconds | ||
| ); | ||
| } | ||
| ``` | ||
| ```client-apple | ||
| import Appwrite | ||
| import AppwriteModels | ||
|
|
||
| func main() async throws { | ||
| let client = Client() | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") | ||
| .setProject("<PROJECT_ID>") | ||
|
|
||
| let tablesDB = TablesDB(client) | ||
|
|
||
| let rows = try await tablesDB.listRows( | ||
| databaseId: "<DATABASE_ID>", | ||
| tableId: "<TABLE_ID>", | ||
| queries: [ | ||
| Query.equal("title", value: "Avatar") | ||
| ], | ||
| ttl: 60 // Cache for 60 seconds | ||
| ) | ||
| } | ||
| ``` | ||
| ```client-android-kotlin | ||
| import io.appwrite.Client | ||
| import io.appwrite.Query | ||
| import io.appwrite.services.TablesDB | ||
|
|
||
| suspend fun main() { | ||
| val client = Client(applicationContext) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") | ||
| .setProject("<PROJECT_ID>") | ||
|
|
||
| val tablesDB = TablesDB(client) | ||
|
|
||
| val rows = tablesDB.listRows( | ||
| databaseId = "<DATABASE_ID>", | ||
| tableId = "<TABLE_ID>", | ||
| queries = listOf( | ||
| Query.equal("title", "Avatar") | ||
| ), | ||
| ttl = 60 // Cache for 60 seconds | ||
| ) | ||
| } | ||
| ``` | ||
| ```graphql | ||
| query { | ||
| tablesListRows( | ||
| databaseId: "<DATABASE_ID>", | ||
| tableId: "<TABLE_ID>", | ||
| queries: ["equal(\"title\", [\"Avatar\"])"], | ||
| ttl: 60 | ||
| ) { | ||
| total | ||
| rows { | ||
| _id | ||
| data | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| {% /multicode %} |
There was a problem hiding this comment.
Server SDK examples missing from cache list responses section
The listRows TTL caching section in the rows doc only covers four client SDKs (web, Flutter, Apple, Android Kotlin) and GraphQL. The equivalent section in the pagination doc includes Node.js, Python, Ruby, Deno, PHP, Go, Swift, Kotlin, Rust, Java, Dart, .NET, and an HTTP example. Since TTL caching is useful server-side (e.g., leaderboard APIs, dashboard feeds), server-side developers who find this section will have no example to follow and may miss the feature entirely.

No description provided.