Hyperdrive now treats queries containing PostgreSQL STABLE functions as uncacheable, in addition to VOLATILE functions.
Previously, only functions that PostgreSQL categorizes as VOLATILE (for example, RANDOM(), LASTVAL()) were detected as uncacheable. STABLE functions (for example, NOW(), CURRENT_TIMESTAMP, CURRENT_DATE) were incorrectly allowed to be cached.
Because STABLE functions can return different results across different SQL statements within the same transaction, caching their results could serve stale or incorrect data. This change aligns Hyperdrive’s caching behavior with PostgreSQL’s function volatility semantics.
If your queries use STABLE functions, and you were relying on them being cached, move the function call to your application code and pass the result as a query parameter. For example, instead of WHERE created_at > NOW(), compute the timestamp in your Worker and pass it as WHERE created_at > $1.
Hyperdrive uses text-based pattern matching to detect uncacheable functions. References to function names like NOW() in SQL comments also cause the query to be marked as uncacheable.
For more information, refer to Query caching and Troubleshoot and debug.
Source: Cloudflare
Latest Posts
- (Updated) Microsoft Viva Glint: Copilot will default to ON and move to VFAM as the single control [MC1222648]
![(Updated) Microsoft Viva Glint: Copilot will default to ON and move to VFAM as the single control [MC1222648] 2 pexels castorlystock 3693257](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft 365 Copilot for Teams: Bilingual consecutive interpretation mode with Interpreter agent [MC1239927]
![Microsoft 365 Copilot for Teams: Bilingual consecutive interpretation mode with Interpreter agent [MC1239927] 3 pexels sebastians 750225](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft Teams: Flexible layout for meetings with resizable divider [MC1239934]
![Microsoft Teams: Flexible layout for meetings with resizable divider [MC1239934] 4 donuts 6665183 1920](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Amazon CloudWatch now provides lock contention diagnostics for Amazon RDS for PostgreSQL


![(Updated) Microsoft Viva Glint: Copilot will default to ON and move to VFAM as the single control [MC1222648] 2 pexels castorlystock 3693257](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-castorlystock-3693257-150x150.webp)
![Microsoft 365 Copilot for Teams: Bilingual consecutive interpretation mode with Interpreter agent [MC1239927] 3 pexels sebastians 750225](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-sebastians-750225-150x150.webp)
![Microsoft Teams: Flexible layout for meetings with resizable divider [MC1239934] 4 donuts 6665183 1920](https://mwpro.co.uk/wp-content/uploads/2025/06/donuts-6665183_1920-150x150.webp)

