You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/hyperdrive/configuration/query-caching.mdx
+27-44Lines changed: 27 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,13 +19,19 @@ For example, a read query that populates the front page of a news site would be
19
19
20
20
<Tabs>
21
21
<TabItemlabel="PostgreSQL">
22
-
```sql -- Cacheable SELECT * FROM articles WHERE DATE(published_time) =
23
-
CURRENT_DATE() ORDER BY published_time DESCLIMIT50```
24
-
</TabItem>
25
-
<TabItem label="MySQL">
26
-
```sql -- Cacheable SELECT * FROM articles WHERE DATE(published_time) =
27
-
CURDATE() ORDER BY published_time DESCLIMIT50```
28
-
</TabItem>
22
+
```sql
23
+
-- Cacheable
24
+
SELECT*FROM articles WHEREDATE(published_time) =
25
+
CURRENT_DATE() ORDER BY published_time DESCLIMIT50
26
+
```
27
+
</TabItem>
28
+
<TabItemlabel="MySQL">
29
+
```sql
30
+
-- Cacheable
31
+
SELECT*FROM articles WHEREDATE(published_time) =
32
+
CURDATE() ORDER BY published_time DESCLIMIT50
33
+
```
34
+
</TabItem>
29
35
</Tabs>
30
36
31
37
Mutating queries (including `INSERT`, `UPSERT`, or `CREATE TABLE`) and queries that use [functions designated as `volatile` by PostgreSQL](https://www.postgresql.org/docs/current/xfunc-volatility.html) are not cached:
@@ -80,38 +86,16 @@ You can also configure multiple Hyperdrive connections from a single application
0 commit comments