Skip to main content

3 posts tagged with "cache"

View All Tags

TeaQL Rust v0.7.0 Release

· One min read

TeaQL Rust reaches v0.7.0. The crates are published and documented.

Crate Structure

teaql-core                   // Entity traits, metadata, and core queries
teaql-sql // SQL dialect and AST-to-SQL compiler
teaql-runtime // UserContext, registry, graph writes, checkers, and events
teaql-macros // Derive macro for entity descriptors
teaql-provider-sqlx-postgres // PostgreSQL SQLx provider adapter
teaql-provider-sqlx-sqlite // SQLite SQLx provider adapter
teaql-provider-sqlx-mysql // MySQL SQLx provider adapter
teaql-provider-rusqlite // synchronous SQLite rusqlite provider adapter

Each crate has a standalone readme with examples.

Aggregation Cache

let cache = AggregationCache::new(CacheBackend::Memory)
.namespace("daily_revenue")
.ttl(Duration::from_secs(300));

let revenue: Decimal = cache
.get_or_compute(|| compute_daily_revenue())
.await?;

Namespaced caches prevent key collisions across different aggregations.

SQL Debug Logging

let ctx = UserContext::new()
.with_sql_debug(true);

// Logs: SELECT id, name FROM user_t WHERE age >= ?
// Params: [18]

Debug output shows the final SQL and bound parameters. Toggle per request via UserContext.

Extended Query Expressions

let expr = User::age()
.gte(18)
.and(User::status().in_vec(&["active", "premium"]))
.or(User::role().eq("admin"));

in_vec, between, like, and nested and/or groups are now supported.

v0.7.1 Patch

Quick patch for documentation links. No functional changes.

What's Next

Repository module split and open source cleanup.

Aggregation Query Caching and Local Deployment

· One min read

Aggregation query caching significantly improves dashboard performance. Local deployment mode is now supported.

Aggregation Query Cache

+ AggregationCache: caches aggregate query results
+ Recursive cache invalidation when entities change
+ Configurable cache TTL

Significantly improves performance for dashboards and reports with repeated aggregation queries.

Equals/HashCode

ID-based equals() and hashCode() implementations:

Set<Order> uniqueOrders = new HashSet<>(orderList);

Local Deployment Support

TeaQL can now run without cloud infrastructure for development and testing environments.

Global Cache Capacity Limits

Prevent memory exhaustion in long-running applications.

View Renderer with Redis Caching

· One min read
TeaQL Code Gen
Core Contributor

The view rendering system gained Redis-backed persistent caching, and the Service Request framework landed.

Redis View Cache

UserContext now includes DataStore/Redis DataStore:

+ Redis-backed view data storage
+ View parser with template rendering
+ Customizable empty view support

Service Request Framework

+ Service request controller registry
+ Processor-based request handling
+ Request path prefix configuration

UI Template Renderer

Template renderer for generating UI views from domain models using ObjectMapper for JSON serialization.

Generator Updates

  • Service request controller/processor generation
  • Request path prefix configuration
  • Candidate preparation generation
  • viewObject and JsonMe support