From 964843d43f2dc4bcf30fac243cba60b9b2e97a0f Mon Sep 17 00:00:00 2001 From: Mazen Touati Date: Wed, 7 Feb 2024 16:14:54 +0100 Subject: [PATCH] docs: link the examples in README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 85df406..4be5c5b 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Cacheable entities is an opinionated infrastructure acts as an abstraction layer * [Cacheable Generic](#cacheable-generic) * [SerializableCacheable](#serializablecacheable) * [SupportsDefaultValue](#supportsdefaultvalue) + * [Examples](#examples) * [Changelog](#changelog) * [License](#license) @@ -383,6 +384,14 @@ This contract accepts two generic definitions `` This contract accepts one generic definition ``, which is what the entity will return when missing the cache while using the `AsyncCache` utility. +## Examples +Some examples of cacheable entities were included to learn more on how to: +- [Define a simple cacheable entity](examples/Queries/AuthorPopularBooksQuery.php) +- [Use the stale cache technique*](examples/Queries/AuthorPopularBooksWithStaleCacheQuery.php) +- [Deal with corrupt serialized values](examples/Queries/UserRecommendedBooks.php) + +`*`The stale cache technique is a way to avoid having any user-facing request hitting a cache miss. You can read more about it and its pros and cons in the [blog post](TBD). + ## Changelog Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.