Skip to content

Clean up .lock files after cache operations #114

Description

@raiderrobert

Context

In src/template/cache.rs (lines 109-117), advisory .lock files are created during cache operations:

let lock_path = cache_dir.join(format!("{key}.lock"));
let lock_file = std::fs::File::create(&lock_path)?;
lock_file.lock_exclusive()?;

These files persist on disk after the process exits. While they are harmless (empty files), they accumulate over time. clear_cache does not remove them either.

Suggestion

Clean up .lock files after the lock is released, or include them in clear_cache cleanup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions