| 6 | | 1. delete all the scripts that were not used in the last X seconds (just as EA does, not very powerful IMHO) |
| 7 | | 1. sort the scripts by last use and delete the older 10% |
| 8 | | 1. use more more complex sorting logic, such as "A*last_use + B*size" with A and B two customizable numeric constants |
| 9 | | 1. call a PHP hook to let the "reaper logic" be implemented in a script itself: it could receive the cache data and free size needed and return the names or IDs of the scripts to be purged (alternatively it could be added a xcache_ function to purge a single script instead of the entire cache as xcache_clear_cache() does) |
| | 6 | * delete all the scripts that were not used in the last X seconds (just as EA does, not very powerful IMHO) |
| | 7 | * sort the scripts by last use and delete the older 10% |
| | 8 | * use more more complex sorting logic, such as "A*last_use + B*size" with A and B two customizable numeric constants |
| | 9 | * call a PHP hook to let the "reaper logic" be implemented in a script itself: it could receive the cache data and free size needed and return the names or IDs of the scripts to be purged (alternatively it could be added a xcache_ function to purge a single script instead of the entire cache as xcache_clear_cache() does) |