You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have implemented this static class that helps me save time. I think it could be helpful for others as well.
What do you think?
Here is the link and a copy of the class. If you agree, I will prepare a PR with the class and tests.
If I implement the method CacheInterface::set(string $key, mixed $value, DateInterval|int|null $ttl = null): bool;, the third parameter becomes useful. You can simply call Expire::at($ttl) to get a nullable integer, which is common for many storage systems.
Hello,
I have implemented this static class that helps me save time. I think it could be helpful for others as well.
What do you think?
Here is the link and a copy of the class. If you agree, I will prepare a PR with the class and tests.
If I implement the method
CacheInterface::set(string $key, mixed $value, DateInterval|int|null $ttl = null): bool;
, the third parameter becomes useful. You can simply callExpire::at($ttl)
to get a nullable integer, which is common for many storage systems.The text was updated successfully, but these errors were encountered: