Integrate hero_redis for session and cart persistence #22

Closed
opened 2026-02-09 21:06:24 +00:00 by mik-tf · 1 comment
Owner

Overview

Replace in-memory session and cart storage with hero_redis for persistent, distributed caching. This enables session survival across app restarts and horizontal scaling.

Hero Component

  • Binary: hero_redis
  • Protocol: Redis-compatible
  • Location: lhumina_code/hero_redis/

Current State

  • Sessions: JWT-based (stateless, no server-side storage)
  • Cart: In-memory or cookie-based
  • No server-side caching layer

Implementation Plan

  1. Add hero_redis to Docker Compose stack
  2. Implement Redis-backed session store for Actix-Web
  3. Move cart persistence to Redis (survives server restart)
  4. Add caching layer for frequently-accessed data (product listings, user profiles)
  5. Implement cache invalidation on data mutation
  6. Add TTL-based expiration for sessions and cache entries

Acceptance Criteria

  • Sessions persist across application restarts
  • Cart contents survive page refreshes without cookies
  • Frequently accessed pages load faster with caching
  • Cache invalidation works correctly on data changes

Dependencies

  • Requires Phase 1 complete for clean data access patterns
## Overview Replace in-memory session and cart storage with `hero_redis` for persistent, distributed caching. This enables session survival across app restarts and horizontal scaling. ## Hero Component - **Binary**: `hero_redis` - **Protocol**: Redis-compatible - **Location**: `lhumina_code/hero_redis/` ## Current State - Sessions: JWT-based (stateless, no server-side storage) - Cart: In-memory or cookie-based - No server-side caching layer ## Implementation Plan 1. Add `hero_redis` to Docker Compose stack 2. Implement Redis-backed session store for Actix-Web 3. Move cart persistence to Redis (survives server restart) 4. Add caching layer for frequently-accessed data (product listings, user profiles) 5. Implement cache invalidation on data mutation 6. Add TTL-based expiration for sessions and cache entries ## Acceptance Criteria - [ ] Sessions persist across application restarts - [ ] Cart contents survive page refreshes without cookies - [ ] Frequently accessed pages load faster with caching - [ ] Cache invalidation works correctly on data changes ## Dependencies - Requires Phase 1 complete for clean data access patterns
Author
Owner

archived repo, closing

archived repo, closing
Commenting is not possible because the repository is archived.
No description provided.