Skip to content

Cache

Nubo caches parsed .nubo server files to avoid re-tokenizing and re-parsing the same file on every request.

The server caches parsed AST nodes for executable .nubo files.

app/
index.nubo

When / is requested, index.nubo is parsed and cached.

The cache duration is 5 minutes.

After 5 minutes, Nubo parses the file again.

Nubo hashes the file content.

If the file changes, the hash changes and the cache is ignored.

That means a cached file is reused only when:

ConditionRequired
Cache entry existsyes
File hash matchesyes
Cache has not expiredyes

When serving a directory in development mode, Nubo reloads the router on each request.

Terminal window
nubo serve app --dev

This helps route file changes become visible while developing.

In development request logs, cached responses may be shown with:

[cached]