rob893 / emoji-cache
LRU cache implementation but all identifiers are emojis.
v1.0.2
2022-12-15 05:52 UTC
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-12-15 09:49:07 UTC
README
LRU cache implementation but all identifiers are emojis.
Yes. This is actually valid code and does indeed work.
But why?
Irrelevant. This exists now.
Installation
Install using composer.
composer require rob893/emoji-cache
Usage:
// Create new cache $😈 = new 🐆🐆🐆(); $🔑 = 'foo'; $⚰️ = 12345; // Check if cache has key. Will be false. $😍 = $😈->🤔🤔🤔($🔑); echo $😍; // Set key value $😈->✍️✍️✍️($🔑, $⚰️); // Check if key exists. Will be true. $💣 = $😈->🤔🤔🤔($🔑); // Get value for key. $⚔️ = $😈->🤔🤞😃($🔑); // Get size of cache. $📈 = $😈->👙💩🖇(); echo $💣; echo $⚔️; echo $📈; // Clear cache. $😈->❌❌❌(); // Check size again. echo $😈->👙💩🖇();