Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR]: Add a WeakCache using WeakReference #16372

Closed
rudiservo opened this issue Jul 6, 2023 · 2 comments · Fixed by #16377
Closed

[NFR]: Add a WeakCache using WeakReference #16372

rudiservo opened this issue Jul 6, 2023 · 2 comments · Fixed by #16377
Labels
new feature request Planned Feature or New Feature Request

Comments

@rudiservo
Copy link
Contributor

The idea is to add a key => value Cache service that uses a WeakReference Object has value.

WeakReference was implemented in PHP 7.4, it uses creates an objects that has a reference to an object but does not prevent it from being destroyed by the Garbage Collector.

So we can have a key => value cache that will return an object if it exists anywhere in memory and has not been destroyed by the GB.

This will help solve issues with the ORM in the future.

For more information about WeakReference

https://www.php.net/manual/en/class.weakreference.php

@rudiservo rudiservo added the new feature request Planned Feature or New Feature Request label Jul 6, 2023
@niden niden linked a pull request Jul 17, 2023 that will close this issue
5 tasks
@niden
Copy link
Member

niden commented Jul 17, 2023

Resolved in #16377

Thank you again @rudiservo

@rudiservo
Copy link
Contributor Author

No problem, hopefully you will be approving more :)
It's always a good experience and I am learning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature request Planned Feature or New Feature Request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants