Skip to content

Releases: allen2c/cachetic

v0.5.0

29 Dec 08:20
afbb3da

Choose a tag to compare

What's Changed

  • Feature/compression by @allen2c in #3
  • ✨ feat(deps): Add rich and markdown dependencies to enhance documenta… by @allen2c in #4

Full Changelog: v0.4.1...v0.5.0

v0.4.0

24 Jul 11:28
8201ac1

Choose a tag to compare

🚀 MongoDB Cache Support & Refactor! 🥭

✨ What’s New

  • MongoDB Backend Added!
    You can now use MongoDB as a cache backend via a simple connection string.

    • New MongoCache class in cachetic/extensions/mongodb.py
    • Just use a URL like mongodb://localhost:27017/dbname?collection=collname!
  • Protocol-Driven Design
    Introduced a CacheProtocol (PEP 544) for cache backends, making it easier to extend and type-check.

  • Cleaner URL Masking
    Moved the password-masking logic to cachetic/utils/hide_url_password.py for safe logging.

  • Type Safety
    Added DocumentParam TypedDict for MongoDB document structure.

🧪 Tests

  • Added test_mongo_cache.py for MongoDB cache integration.
  • Added test_redis_cache.py for Redis cache integration.
  • Fixtures for both Redis and MongoDB connection strings in conftest.py.

🛠️ Dependency Updates

  • Added pymongo, str-or-none, and dnspython to requirements.
  • Updated pyproject.toml with optional MongoDB dependencies.

🧹 Refactoring & Housekeeping

  • Removed the old _hide_url_password from __init__.py.
  • Added missing __init__.py files for new submodules.

What's Changed

Full Changelog: v0.3.0...v0.4.0


Enjoy caching with MongoDB, Redis, or DiskCache!
Let’s keep things fast, safe, and extensible! 🚦✨

v0.3.0

15 Jul 10:09
9aa4052

Choose a tag to compare

🚀 Cachetic v0.3.0: Type-Safe Caching Revolution! ✨

🎯 What's New

This is a major rewrite that transforms Cachetic into a modern, type-safe caching library!

🔥 Breaking Changes & Improvements

🏗️ Complete API Redesign

  • 📝 New requirement: All caches now use pydantic.TypeAdapter[T] for type safety
  • 🔄 Renamed fields: cache_ttldefault_ttl, cache_prefixprefix
  • 🧹 Simplified serialization: Everything goes through TypeAdapter (no more complex type handling)

📚 Documentation Overhaul

📖 Completely rewritten README with:

  • ✨ Clean, modern examples
  • 🎯 Focus on type safety and simplicity
  • 📋 Better organized sections
  • 🛠️ Comprehensive configuration guide

🧪 Test Suite Modernization

🔬 Brand new test suite:

  • ✅ Tests for all README examples
  • 🧽 Clean, isolated test setup
  • 📦 Comprehensive type coverage
  • 🚀 Better test organization

📦 Dependency Updates

⬆️ Refreshed dependencies:

  • 🔓 Relaxed version constraints
  • 📈 Updated to latest compatible versions
  • 🛡️ Better security posture

💔 Breaking Changes

⚠️ Migration required for existing users:

Before (v0.2.x):

cache = Cachetic[str](object_type=str, cache_ttl=3600, cache_prefix="app")

After (v0.3.0):

cache = Cachetic[str](
    object_type=pydantic.TypeAdapter(str), 
    default_ttl=3600, 
    prefix="app"
)

🎉 Why This Matters

Better Developer Experience:

  • 🔒 Full type safety with generics
  • 🎯 Simpler, more consistent API
  • 📝 Crystal clear documentation
  • 🚀 Modern Python patterns

This release sets the foundation for a robust, type-safe caching experience that scales with your applications!

What's Changed

New Contributors

Full Changelog: v0.2.0...v0.3.0


📋 Summary: Major version upgrade with breaking API changes, complete documentation rewrite, modernized test suite, and focus on type safety through pydantic.TypeAdapter.