## ADDED Requirements ### Requirement: Cached session list queries Frequently-called session list queries SHALL be cached using Next.js `unstable_cache` with user-scoped tags, avoiding redundant DB reads on repeated navigations. #### Scenario: Session list served from cache on repeated navigation - **WHEN** a user navigates to the sessions page multiple times within the cache window - **THEN** the session list data SHALL be served from cache on subsequent requests - **THEN** no additional Prisma query SHALL be executed for cached data #### Scenario: Cache invalidated after mutation - **WHEN** a Server Action creates, updates, or deletes a session - **THEN** the corresponding cache tag SHALL be invalidated via `revalidateTag` - **THEN** the next request SHALL fetch fresh data from the DB ### Requirement: Weather history bounded query The weather service SHALL limit historical data loading to a configurable maximum number of entries (default: 90), ordered by most recent first. #### Scenario: Weather history respects limit - **WHEN** the weather service fetches historical entries - **THEN** at most `WEATHER_HISTORY_LIMIT` entries SHALL be returned - **THEN** entries SHALL be ordered by `createdAt` DESC (most recent first) ### Requirement: Minimal field selection on list queries Service functions returning lists for display purposes SHALL use Prisma `select` with only the fields required for the list UI, not full `include` of related models. #### Scenario: Sessions list query returns only display fields - **WHEN** the sessions list service function is called - **THEN** the returned objects SHALL contain only fields needed for card display (id, title, createdAt, item count, share status) - **THEN** full related model objects (items array, events array) SHALL NOT be included