FamilyHQ Sign out Sign in

LAZYSITE_NOCACHE

Bypass cache reads and writes for development and testing.

LAZYSITE_NOCACHE

Setting the LAZYSITE_NOCACHE environment variable bypasses both cache reading and cache writing. Every request processes the page from source.

What is bypassed

Cache reads: the fast path in main() that serves .html cache files is skipped entirely. The processor always reads and processes the .md source file.

Cache writes: write_html() returns immediately without writing the .html cache file. No cache files are created or updated.

How to set it

Environment variable:

LAZYSITE_NOCACHE=1 perl cgi-bin/lazysite-processor.pl

The dev server sets it by default:

perl tools/lazysite-server.pl

To disable it in the dev server (enable caching):

perl tools/lazysite-server.pl --cache

Example

Test a page without touching the cache:

LAZYSITE_NOCACHE=1 \
REDIRECT_URL=/my-page \
DOCUMENT_ROOT=/path/to/public_html \
  perl cgi-bin/lazysite-processor.pl

Notes