folded-php / folded-php/routing
Add a cache mecanism
- Dominant language
- PHP
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Description
Since this library relies on [nikic/fast-route](https://github.com/nikic/FastRoute), we can leverage the cache feature.
## Expected behavior
To be able to specify wether to enable caching route or not.
```php
use Folded\enableRouteCache;
use Folded\disableRouteCache;
enableRouteCache();
disableRouteCache();
```
It should be disabled by default.
And being able to specify in which file to store the cache.
```php
setRouteCacheFilePath(__DIR__ . "/cache/routes/routes.php");
```
## Actual behavior
No way to enable/disable route cache, nor a way to set the route cache file.
## Notes
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.