@@ -5,7 +5,7 @@ All notable changes to arch-toolkit will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8- ## [ 0.1.0] - 2025-01-XX
8+ ## [ 0.1.0] - 2025-12-21
99
1010### Added
1111
@@ -29,6 +29,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929 - Fetches from AUR cgit repository
3030 - Dual-level rate limiting (200ms minimum interval + exponential backoff)
3131 - 10-second timeout
32+ - ** Optional Caching Layer** : In-memory and disk caching for AUR operations
33+ - In-memory LRU cache with configurable TTL per operation
34+ - Optional disk cache with JSON serialization for persistence
35+ - Per-operation cache enable/disable flags (search, info, comments, pkgbuild)
36+ - Configurable TTLs for each operation type
37+ - Cache promotion from disk to memory on hit
38+ - Thread-safe implementation with Arc and Mutex
39+ - Standardized cache key generation functions for consistent key formatting
40+ - Generic ` Cache<K, V> ` trait for extensible cache implementations
3241
3342#### Core Infrastructure
3443- ** Unified Error Type** : ` ArchToolkitError ` enum with comprehensive error variants
@@ -38,38 +47,82 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3847 - Rate limiting errors with retry-after information
3948 - Not found errors
4049 - Invalid input errors
50+ - Cache errors (serialization, I/O, expiration)
4151- ** HTTP Client with Rate Limiting** : Shared client with built-in rate limiting
4252 - Exponential backoff for archlinux.org requests (500ms base, max 60s)
4353 - Semaphore-based request serialization
4454 - Random jitter to prevent thundering herd
4555 - Automatic backoff reset on successful requests
56+ - ** Client Builder Pattern** : ` ArchClientBuilder ` for flexible client configuration
57+ - Custom timeout configuration
58+ - User agent customization
59+ - Retry policy configuration with exponential backoff
60+ - Cache configuration support
61+ - ** Retry Policy** : Configurable retry behavior for transient network failures
62+ - Exponential backoff with configurable initial and max delays
63+ - Random jitter to prevent thundering herd
64+ - Per-operation retry enable/disable flags (search, info, comments, pkgbuild)
65+ - Automatic retry-after header handling
66+ - Error classification (timeouts, 5xx, 429 are retryable)
67+ - ** Cache Invalidation API** : ` CacheInvalidator ` builder for manual cache management
68+ - Invalidate specific search queries
69+ - Invalidate info cache for specific packages
70+ - Invalidate comments cache for specific packages
71+ - Invalidate pkgbuild cache for specific packages
72+ - Invalidate all caches for a package
73+ - Clear all caches
74+ - ** AUR Operations Wrapper** : ` Aur ` struct providing fluent API for AUR operations
75+ - Method chaining: ` client.aur().search() ` , ` client.aur().info() ` , etc.
76+ - Automatic rate limiting and retry handling
77+ - Integrated caching when configured
4678- ** Type System** : Comprehensive data types for AUR operations
4779 - ` AurPackage ` : Minimal package info for search results
4880 - ` AurPackageDetails ` : Full package details with all metadata
4981 - ` AurComment ` : Comment structure with author, date, content, pinned status
5082- ** Utility Functions** : JSON parsing and URL encoding helpers
5183 - ` percent_encode() ` : RFC 3986-compliant URL encoding
5284 - ` s() ` , ` ss() ` , ` arrs() ` , ` u64_of() ` : JSON extraction helpers
85+ - ` is_retryable_error() ` : Classify network errors as retryable or not
86+ - ` extract_retry_after() ` : Extract Retry-After header from HTTP responses
87+ - ` cache_key_*() ` : Standardized cache key generation for all operation types
5388
5489#### Documentation
5590- Comprehensive rustdoc comments for all public APIs
5691 - What/Inputs/Output/Details format
5792 - Usage examples in documentation
93+ - Error documentation with ` # Errors ` sections
5894- Crate-level documentation with examples for all AUR operations
5995- README with usage examples
96+ - Example programs demonstrating AUR operations (` examples/aur_example.rs ` )
97+ - Example program demonstrating caching layer (` examples/with_caching.rs ` )
6098
6199#### Testing
62100- Unit tests for search and info parsing
63101- Test coverage for JSON parsing edge cases
64- - Integration test structure in place
102+ - Unit tests for cache implementations (memory and disk)
103+ - Integration tests for caching layer (` tests/cache_integration.rs ` )
104+ - Test coverage for cache TTL expiration and LRU eviction
105+ - Thread safety tests for concurrent cache access
106+
107+ #### Development Infrastructure
108+ - GitHub Pull Request template for standardized PRs
109+ - GitHub issue templates for bug reports and feature requests
110+ - GitHub Actions workflows for CI/CD
111+ - Rust build and test workflow
112+ - Documentation deployment workflow
113+ - Release automation workflow
114+ - CodeQL security analysis workflow
115+ - Cursor IDE commands for development workflow
65116
66117### Technical Details
67118- ** Async-first design** : All I/O operations use ` tokio ` async/await
68- - ** Feature flags** : Modular design with ` aur ` feature flag
119+ - ** Feature flags** : Modular design with ` aur ` and ` cache-disk ` feature flags
69120- ** Zero dependencies by default** : Minimal core dependencies (serde, thiserror, tracing)
70121- ** Optional dependencies** : HTTP client, HTML parsing, date handling only when ` aur ` feature is enabled
122+ - ** Caching dependencies** : LRU cache and directory utilities only when caching is used
71123- ** Strict code quality** : Clippy pedantic and nursery rules enabled
72124- ** Complexity thresholds** : Cyclomatic and data flow complexity < 25
125+ - ** Cache design** : Generic ` Cache<K, V> ` trait for extensibility
73126
74127[ 0.1.0 ] : https://github.com/Firstp1ck/arch-toolkit/releases/tag/v0.1.0
75128
0 commit comments