matomo-org / matomo-org/component-cache
Add possibility to set a cacheKey in constructor and to reuse this key
- Dominant language
- PHP
- Stars
- 38
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
For example by developing a decorator.
This will bring a performance improvement as we do for each `fetch`, `contains`, `save` run a `preg_match` https://github.com/piwik/component-cache/blob/master/src/Lazy.php#L119 and a `completeCacheKey` which is expensive when executed a million of times (which we do) eg in BulkTracking or QueuedTracking. Also via Archiving etc.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading src/Lazy.php around line 119 and trace how fetch, contains, save, and completeCacheKey are used. Consider the proposed constructor cacheKey and decorator direction, then verify that repeated operations can reuse the key without repeating the expensive matching and completion work described for BulkTracking, QueuedTracking, and Archiving.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100