Files
py-wikijs/wikijs/cache/__init__.py
Claude 59cdf5ee01 refactor: Rename package from wikijs-python-sdk to py-wikijs and migrate to GitHub
Complete package renaming and platform migration:

Package Name Changes:
- Rename package from 'wikijs-python-sdk' to 'py-wikijs'
- Update setup.py package name
- Update pyproject.toml package name
- Users can now install with: pip install py-wikijs

URL Migration (Gitea → GitHub):
- Replace all Gitea URLs with GitHub URLs
- Update repository: github.com/l3ocho/py-wikijs
- Update issue tracker: github.com/l3ocho/py-wikijs/issues
- Update documentation links
- Fix URL path format (/src/branch/main/ → /blob/main/)

Documentation Updates:
- Update README.md badges (PyPI, GitHub)
- Update installation instructions (pip install py-wikijs)
- Update all doc references to new package name
- Update all examples with GitHub URLs
- Update DEPLOYMENT_READY.md with new package name
- Update deployment.md with new package name

Testing:
- Successfully built py_wikijs-0.1.0.tar.gz (138 KB)
- Successfully built py_wikijs-0.1.0-py3-none-any.whl (66 KB)
- Package installs correctly: pip install py-wikijs
- Imports work: from wikijs import WikiJSClient
- Package metadata correct (Home-page: github.com/l3ocho/py-wikijs)

Breaking Changes:
- Package name changed from wikijs-python-sdk to py-wikijs
- Repository migrated from Gitea to GitHub
- All URLs updated to GitHub

Users should now:
pip install py-wikijs  # Instead of wikijs-python-sdk

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 20:23:50 +00:00

25 lines
768 B
Python

"""Caching module for py-wikijs.
This module provides intelligent caching for frequently accessed Wiki.js resources
like pages, users, and groups. It supports multiple cache backends and TTL-based
expiration.
Example:
>>> from wikijs import WikiJSClient
>>> from wikijs.cache import MemoryCache
>>>
>>> cache = MemoryCache(ttl=300) # 5 minute TTL
>>> client = WikiJSClient('https://wiki.example.com', auth='api-key', cache=cache)
>>>
>>> # First call hits the API
>>> page = client.pages.get(123)
>>>
>>> # Second call returns cached result
>>> page = client.pages.get(123) # Instant response
"""
from .base import BaseCache, CacheKey
from .memory import MemoryCache
__all__ = ["BaseCache", "CacheKey", "MemoryCache"]