caneslarry / php-helpers
Useful functions for PHP development.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/caneslarry/php-helpers
Requires
- php: >=8.1
This package is auto-updated.
Last update: 2025-12-23 01:50:04 UTC
README
`
// Example usage:
$cache = new Cache();
$cache->set('example_key', 'example_value', 10);
$value = $cache->get('example_key');
if ($value !== null) {
echo "Value from cache: $value\n";
} else {
echo "Value not found in cache.\n";
}
sleep(15);
$value = $cache->get('example_key');
if ($value !== null) {
echo "Value from cache: $value\n";
} else {
echo "Value not found in cache after TTL expiry.\n";
}
`