Skip to content

Commit c13f110

Browse files
committed
Docs are updated
1 parent c843938 commit c13f110

File tree

2 files changed

+65
-65
lines changed

2 files changed

+65
-65
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# Laravel SmartCache - Optimize Caching for Large Data
1+
# Laravel SmartCache — Production-Grade Caching for Large Data
22

33
[![Latest Version](https://img.shields.io/packagist/v/iazaran/smart-cache.svg)](https://packagist.org/packages/iazaran/smart-cache)
44
[![License](https://img.shields.io/packagist/l/iazaran/smart-cache.svg)](https://packagist.org/packages/iazaran/smart-cache)
55
[![PHP Version](https://img.shields.io/packagist/php-v/iazaran/smart-cache.svg)](https://packagist.org/packages/iazaran/smart-cache)
66
[![Tests](https://img.shields.io/github/workflow/status/iazaran/smart-cache/tests?label=tests)](https://github.com/iazaran/smart-cache/actions)
77

8-
**SmartCache** optimizes Laravel caching for **large datasets** through intelligent compression (up to 70% size reduction), smart chunking, and automatic optimization - while maintaining Laravel's familiar Cache API.
8+
**SmartCache** is a drop-in replacement for Laravel's Cache facade that automatically optimizes large datasets — delivering up to **70% size reduction** through intelligent compression, smart chunking, cost-aware eviction, and adaptive optimization. Fully implements `Illuminate\Contracts\Cache\Repository` and PSR-16 `SimpleCache` for seamless integration.
99

1010
## 🎯 The Problem It Solves
1111

1212
Caching large datasets (10K+ records, API responses, reports) in Laravel can cause:
13-
- **Memory issues** - Large arrays consume too much RAM
14-
- **Storage waste** - Uncompressed data fills Redis/Memcached quickly
15-
- **Slow performance** - Serializing/deserializing huge objects takes time
16-
- **Cache stampede** - Multiple processes regenerating expensive data simultaneously
13+
- **Memory pressure** Large arrays and collections consume excessive RAM
14+
- **Storage waste** Uncompressed data fills Redis/Memcached quickly, increasing infrastructure costs
15+
- **Latency spikes** Serializing/deserializing large objects degrades response times
16+
- **Cache stampede** Multiple processes regenerating expensive data simultaneously under load
1717

18-
**SmartCache fixes all of this automatically.**
18+
**SmartCache addresses all of these automatically, with zero code changes required.**
1919

2020
## 📦 Installation
2121

@@ -49,7 +49,7 @@ $users = SmartCache::remember('users', 3600, function() {
4949
});
5050
```
5151

52-
**✨ The Magic:** Large data is automatically compressed and chunked - reducing cache size by up to 70%!
52+
**How it works:** Large data is automatically compressed and chunked behind the scenes — reducing cache size by up to 70% with no additional code.
5353

5454
### Helper Function
5555

@@ -124,14 +124,14 @@ SmartCache chooses the best optimization automatically:
124124
| API Responses | >100KB | Both | Best performance |
125125
| Small Data | <50KB | None | Fastest (no overhead) |
126126

127-
## 📈 Real Performance Impact
127+
## 📈 Measured Performance Impact
128128

129-
**Production Results (E-commerce Platform):**
130-
- **72%** cache size reduction (15MB → 4.2MB)
131-
- **800MB** daily Redis memory savings
132-
- **40%** faster retrieval vs standard Laravel Cache
129+
**Production benchmark (e-commerce platform, Redis backend):**
130+
- **72%** cache size reduction (15 MB → 4.2 MB)
131+
- **800 MB** daily Redis memory savings
132+
- **40%** faster retrieval compared to standard Laravel Cache
133133
- **94.3%** cache hit ratio
134-
- **23ms** average retrieval time
134+
- **23 ms** average retrieval time
135135

136136
## 🔧 Advanced Features (Opt-in)
137137

@@ -359,10 +359,10 @@ $data = SmartCache::rememberWithStampedeProtection('key', 3600, function() {
359359

360360
**Benefit:** Prevents multiple processes from regenerating cache simultaneously
361361

362-
### 🧠 Cost-Aware Caching (GreedyDual-inspired)
362+
### 🧠 Cost-Aware Caching
363363

364-
SmartCache is the **only PHP cache library** that understands the *value* of what it's caching. Every `remember()` call automatically tracks:
365-
- **Regeneration cost** — how long the callback took (measured in milliseconds)
364+
Inspired by the GreedyDual-Size algorithm, SmartCache is the **only PHP cache library** that understands the *value* of what it's caching. Every `remember()` call automatically measures:
365+
- **Regeneration cost** — how long the callback took to execute (milliseconds)
366366
- **Access frequency** — how often the key is read
367367
- **Size** — how much memory the entry consumes
368368

@@ -671,7 +671,7 @@ $users = SmartCache::get('users'); // Automatically restored!
671671
**That's it!** No code changes needed. You immediately get:
672672
- ✅ Automatic compression for large data
673673
- ✅ Smart chunking for large arrays
674-
-All new features available
674+
-Full access to extended capabilities (encryption, circuit breaker, cost-aware caching, and more)
675675

676676
## 📚 Documentation
677677

@@ -686,7 +686,7 @@ $users = SmartCache::get('users'); // Automatically restored!
686686

687687
## 🧪 Testing
688688

689-
SmartCache includes **300+ comprehensive tests** covering all functionality:
689+
SmartCache includes **415+ comprehensive tests** with **1700+ assertions** covering all functionality:
690690

691691
```bash
692692
composer test
@@ -713,8 +713,8 @@ MIT License. See [LICENSE](LICENSE) for details.
713713

714714
<div align="center">
715715

716-
**Built with ❤️ for the Laravel community**
716+
**Built for the Laravel community**
717717

718-
*Optimize caching for large data - from simple apps to enterprise systems*
718+
*Production-grade caching from rapid prototypes to enterprise-scale systems*
719719

720720
</div>

0 commit comments

Comments
 (0)