Skip to content

Commit b1be5c6

Browse files
authored
Update README.md
1 parent dfd92b9 commit b1be5c6

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ currently invalidating the cache key if one of the Images assigned to an Item ch
7575

7676
Neither option is great, but it is something that must be solved.
7777

78-
Assuming we find our solution, we still end up needing one cache key per block; if our page contains many blocks, then
79-
we have many cache keys that we need to calculate in order to have an accurate cache key for a single page.
80-
8178
## How we aim to solve these difficulties
8279

8380
**In short:**
@@ -93,8 +90,8 @@ create lean cache keys which we invalidate when dependencies require them to be.
9390

9491
**Preamble:** When we talk about "changes to records", this includes all C.R.U.D. actions.
9592

96-
**Relationship config:** In order for this module to function, we need to understand **both directions** of any
97-
relationship that you create a `care` for. [More on this here](docs/en/relationship-config.md).
93+
**Relationship config:** In order for this module to function, we often need to understand more about the relationships
94+
that you create a `care` for than perhaps Silverstripe ORM does. [More on this here](docs/en/relationship-config.md).
9895

9996
### Has cache key
10097

@@ -152,8 +149,7 @@ class CarouselBlock extends BaseElement
152149
```
153150

154151
Take the original example where we also wanted our `CarouselItem` to include changes to Images as part of its cache key.
155-
We could now also add a `cares` config to our `CarouselItem` (where the `key` is the field relationship name, and the
156-
value is the `class` that it relates to):
152+
We could now also add a `cares` config to our `CarouselItem`:
157153

158154
```yaml
159155
App\Blocks\CarouselItem:
@@ -176,7 +172,7 @@ class CarouselItem extends DataObject
176172
}
177173
```
178174

179-
Now whenever the linked `Image` is updated, it will also update the `CarouselItem`, and in turn the `CarouselItem`
175+
Now whenever the linked `Image` is updated, it will also update the `CarouselItem`, and in turn the `CarouselItem` will
180176
update the linked `Carousel`. Taking this a step further all the way back to `Page`, we could also add the following:
181177

182178
```yaml

0 commit comments

Comments
 (0)