Skip to content

Fully implement cache-manager interface#2

Merged
konard merged 5 commits into
mainfrom
issue-1-b7f6f15febaf
Jun 15, 2026
Merged

Fully implement cache-manager interface#2
konard merged 5 commits into
mainfrom
issue-1-b7f6f15febaf

Conversation

@konard

@konard konard commented Dec 21, 2025

Copy link
Copy Markdown
Member

Summary

This PR fully implements the cache-manager compatible interface for lino-cache, using lino-objects-codec to store objects in Links Notation (.lino) format instead of JSON.

Features

  • LinoCache class with full cache-manager store interface
  • Two storage modes:
    • Folder mode (default): Each cache key stored in a separate .lino file
    • Single-file mode: All cache entries in one .lino file
  • Full cache-manager API:
    • get, set, del - Basic operations
    • mget, mset, mdel - Multi-key operations
    • wrap - Function caching
    • clear, reset - Cache clearing
    • ttl, has, keys - Utility methods
    • disconnect - Cleanup
  • TTL (Time To Live) support for automatic expiration
  • TypeScript type definitions included
  • Factory functions: createLinoCache and linoStore

Changes

  • Replaced placeholder implementation with full LinoCache class
  • Added comprehensive TypeScript definitions
  • Added 30 tests covering all functionality
  • Updated README with complete documentation
  • Added usage examples
  • Renamed package to lino-cache
  • Added lino-objects-codec dependency

Test plan

  • All 30 unit tests pass
  • Folder mode creates separate files per key
  • Single-file mode stores all entries in one file
  • TTL expiration works correctly
  • wrap() caches function results
  • Multi-key operations (mget, mset, mdel) work
  • Special characters in keys handled safely
  • Example script runs successfully

Fixes #1

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #1
@konard konard self-assigned this Dec 21, 2025
…n storage

- Add LinoCache class with full cache-manager store interface
- Support two storage modes: folder mode and single-file mode
- Implement core methods: get, set, del, mget, mset, mdel, wrap, clear
- Add TTL (time-to-live) support for automatic entry expiration
- Use lino-objects-codec for serialization to .lino format
- Include comprehensive TypeScript type definitions
- Add factory functions: createLinoCache and linoStore
- Add 30 comprehensive tests covering all functionality
- Update documentation and examples

Fixes #1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@konard konard changed the title [WIP] Fully implement cache-manager interface Fully implement cache-manager interface Dec 21, 2025
@konard konard marked this pull request as ready for review December 21, 2025 19:08
konard and others added 3 commits December 21, 2025 20:10
Update PACKAGE_NAME constant in all scripts from template's
'my-package' to 'lino-cache' for proper changeset validation
and release automation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
The cache library needs write access to create cache files,
so Deno tests require both --allow-read and --allow-write flags.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@konard

konard commented Dec 21, 2025

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $8.315041 USD
  • Calculated by Anthropic: $5.508339 USD
  • Difference: $-2.806701 (-33.75%)
    📎 Log file uploaded as GitHub Gist (945KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 2b48f7d into main Jun 15, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fully implement cache-manager interface

1 participant