ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / apps/web/app/api/debug/redis-cache/route.ts

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / apps/web/app/api/debug/redis-cache/route.ts
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberapps/web/app/api/debug/redis-cache/route.ts
Original SHA-256361119247a9f12a8cf099e3d7bf23dfc30d39dddf5544a8779af40b789425f94
Git blob SHA3935e72aa79f6247c7ee553e7163543b8da13ce0
Reading-copy SHA-256361119247a9f12a8cf099e3d7bf23dfc30d39dddf5544a8779af40b789425f94

Original source ↗

Recovered source transcript

import { logger } from '@thedaviddias/logging' import { type NextRequest, NextResponse } from 'next/server' import { ensureDebugAccess } from '@/app/api/debug/_utils' import { CACHE_KEYS, get } from '@/lib/redis' /** * GET handler for debugging Redis cache status * * @param request - NextRequest with username query parameter * @returns Promise resolving to NextResponse with cache status or error */ export async function GET(request: NextRequest) { const access = await ensureDebugAccess(request) if (!access.ok) { return access.response } const { searchParams } = new URL(request.url) const username = searchParams.get('username') if (!username) { return NextResponse.json({ error: 'Username parameter required' }, { status: 400 }) } try { const cacheKey = `${CACHE_KEYS.GITHUB_CONTRIBUTIONS}${username}` const cached = await get(cacheKey) logger.info('Debug: Checking Redis cache for contributions', { data: { username, cacheKey, hasCachedData: !!cached }, tags: { type: 'debug', component: 'redis-cache' } }) return NextResponse.json({ username, cacheKey, hasCachedData: !!cached, cachedData: cached, timestamp: new Date().toISOString() }) } catch (error) { logger.error('Debug: Error checking Redis cache', { data: { username, error: error instanceof Error ? error.message : 'Unknown error' }, tags: { type: 'debug', component: 'redis-cache', error: 'check-failed' } }) return NextResponse.json( { error: 'Failed to check Redis cache', details: error instanceof Error ? error.message : 'Unknown error', timestamp: new Date().toISOString() }, { status: 500 } ) } }

Search equations, builds, manuscript text, and recovered sources.