Monorepo: consolidate 7 repos into one
Combines shared, blog, market, cart, events, federation, and account into a single repository. Eliminates submodule sync, sibling model copying at build time, and per-app CI orchestration. Changes: - Remove per-app .git, .gitmodules, .gitea, submodule shared/ dirs - Remove stale sibling model copies from each app - Update all 6 Dockerfiles for monorepo build context (root = .) - Add build directives to docker-compose.yml - Add single .gitea/workflows/ci.yml with change detection - Add .dockerignore for monorepo build context - Create __init__.py for federation and account (cross-app imports)
This commit is contained in:
21
market/bp/browse/services/state.py
Normal file
21
market/bp/browse/services/state.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from typing import Dict, Tuple, List
|
||||
import time
|
||||
|
||||
_nav_cache: dict = {}
|
||||
_nav_cache_ts: float = 0.0
|
||||
_nav_ttl_seconds = 60 * 60 * 6
|
||||
|
||||
_detail_cache: Dict[str, Dict] = {}
|
||||
_detail_cache_ts: Dict[str, float] = {}
|
||||
_detail_ttl_seconds = 60 * 60 * 6
|
||||
|
||||
KNOWN_PRODUCT_SLUGS: set[str] = set()
|
||||
|
||||
_listing_variant_cache: Dict[str, Tuple[str, float]] = {}
|
||||
_listing_variant_ttl = 60 * 60 * 6
|
||||
|
||||
_listing_page_cache: Dict[str, Tuple[Tuple[List[Dict], int], float]] = {}
|
||||
_listing_page_ttl = 60 * 30
|
||||
|
||||
def now() -> float:
|
||||
return time.time()
|
||||
Reference in New Issue
Block a user