Skip to content

Commit 3db7ec7

Browse files
committed
Updated readme
1 parent 66851b3 commit 3db7ec7

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

README.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Laravel Eloquent Query Cache
2+
============================
3+
14
![CI](https://github.com/renoki-co/laravel-eloquent-query-cache/workflows/CI/badge.svg?branch=master)
25
[![codecov](https://codecov.io/gh/renoki-co/laravel-eloquent-query-cache/branch/master/graph/badge.svg)](https://codecov.io/gh/renoki-co/laravel-eloquent-query-cache/branch/master)
36
[![StyleCI](https://github.styleci.io/repos/223236785/shield?branch=master)](https://github.styleci.io/repos/223236785)
@@ -6,13 +9,10 @@
69
[![Monthly Downloads](https://poser.pugx.org/rennokki/laravel-eloquent-query-cache/d/monthly)](https://packagist.org/packages/rennokki/laravel-eloquent-query-cache)
710
[![License](https://poser.pugx.org/rennokki/laravel-eloquent-query-cache/license)](https://packagist.org/packages/rennokki/laravel-eloquent-query-cache)
811

9-
Laravel Eloquent Query Cache
10-
===================================
11-
1212
Laravel Eloquent Query Cache brings back the `remember()` functionality that has been removed from Laravel a long time ago.
1313
It adds caching functionalities directly on the Eloquent level, making use of cache within your database queries.
1414

15-
# Installing the package
15+
## 🚀 Installation
1616

1717
Hop into your console and install the package via Composer:
1818

@@ -33,7 +33,7 @@ class Podcast extends Model
3333
}
3434
```
3535

36-
## Showcase
36+
## 🙌 Usage
3737

3838
The package has the ability to track the SQL used and use it as a key in the cache storage,
3939
making the caching query-by-query a breeze.
@@ -67,7 +67,7 @@ $postsCount = Post::cacheFor(60 * 60)->count();
6767
$postsCount = Post::cacheFor(now()->addDays(1))->count();
6868
```
6969

70-
# Cache Tags & Cache Invalidation
70+
## Cache Tags & Cache Invalidation
7171

7272
Some caching stores accept tags. This is really useful if you plan on tagging your cached queries and invalidate only some of the queries when needed.
7373

@@ -275,9 +275,9 @@ class Book extends Model
275275
}
276276
```
277277

278-
# Advanced
278+
## Advanced
279279

280-
## Implement the caching method to your own Builder class
280+
### Implement the caching method to your own Builder class
281281

282282
Since this package modifies the `newBaseQueryBuilder()` in the model, having multiple traits that
283283
modify this function will lead to an overlap.
@@ -319,7 +319,7 @@ class CustomModel extends Model
319319
CustomModel::cacheFor(30)->customGetMethod();
320320
```
321321

322-
## Generating your own key
322+
### Generating your own key
323323

324324
This is how the default key generation function looks like:
325325

@@ -357,7 +357,7 @@ class MyCustomBuilder implements QueryCacheModuleInterface
357357
}
358358
```
359359

360-
## Implementing cache for other functions than get()
360+
### Implementing cache for other functions than get()
361361

362362
Since all of the Laravel Eloquent functions are based on it, the builder that comes with this package replaces only the `get()` one:
363363

@@ -430,19 +430,25 @@ class MyCustomBuilder
430430
}
431431
```
432432

433-
## Contributing
433+
## 🐛 Testing
434+
435+
``` bash
436+
vendor/bin/phpunit
437+
```
438+
439+
## 🤝 Contributing
434440

435441
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
436442

437-
## Security
443+
## 🔒 Security
438444

439445
If you discover any security related issues, please email alex@renoki.org instead of using the issue tracker.
440446

441-
## Credits
447+
## 🎉 Credits
442448

443449
- [Alex Renoki](https://github.com/rennokki)
444450
- [All Contributors](../../contributors)
445451

446-
## License
452+
## 📄 License
447453

448454
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 commit comments

Comments
 (0)