caching:ex2
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| caching:ex2 [2008/10/07 13:50] – bdefrain | caching:ex2 [2021/02/05 13:51] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Caching: Constant cache ====== | + | [[caching: |
| + | [[caching: | ||
| + | [[caching: | ||
| + | [[caching: | ||
| + | [[caching: | ||
| ===== Using inter-type declarations ===== | ===== Using inter-type declarations ===== | ||
| Line 12: | Line 16: | ||
| A correct implementation should pass the tests of suite '' | A correct implementation should pass the tests of suite '' | ||
| + | |||
| + | When done, remove the aspect from your build path before continuing with the next part. | ||
| ===== Using several aspect instances ===== | ===== Using several aspect instances ===== | ||
| - | Imagine that a '' | + | Imagine that a '' |
| - | Write a new version of the above aspect that does not use inter-type declarations. | + | To avoid this, write a new version of the above aspect that does not change the fields of the '' |
| <note tip> | <note tip> | ||
| Line 24: | Line 30: | ||
| A correct implementation should also pass the tests of suite '' | A correct implementation should also pass the tests of suite '' | ||
| + | |||
| + | When done, remove the aspect from your build path before continuing with the next part. | ||
| + | |||
| + | ===== Reusable caching aspect ===== | ||
| + | |||
| + | A // | ||
| + | |||
| + | * The type of the cache value: i.e. '' | ||
| + | * The operation being cached: i.e. '' | ||
| + | |||
| + | Then reimplement your solution using this generic caching aspect. The new implementation should still pass the tests of suite '' | ||
| ---- | ---- | ||
| - | Keep your aspect | + | Keep the last of your caching aspects |
caching/ex2.1223380219.txt.gz · Last modified: by bdefrain
