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

Replace properties by properly cached ones that do not keep checking every time #59

Open
itkovian opened this issue Nov 9, 2017 · 8 comments
Assignees

Comments

@itkovian
Copy link
Member

itkovian commented Nov 9, 2017

See

@stdweird
Copy link
Member

stdweird commented Nov 9, 2017

this one has TTL support like the perl one 😄 https://wiki.python.org/moin/PythonDecoratorLibrary#Cached_Properties
also, this code should be move to vsc-base

@itkovian
Copy link
Member Author

itkovian commented Nov 9, 2017

Yes.

@itkovian
Copy link
Member Author

itkovian commented Nov 9, 2017

Also, Perl? :p

@JensTimmerman
Copy link
Contributor

JensTimmerman commented Nov 9, 2017

wel I don't think we want ttl support? We could go for the easy option and use the lru_cache decorator
https://docs.python.org/3/library/functools.html#functools.lru_cache then
edit: nvmd, doesn't work on properties I think

@stdweird
Copy link
Member

stdweird commented Nov 9, 2017

not sure, but if we are going to add some more code we didn't write to vsc-base, why not use the one with most features? the python exmaples is not some random guys blog imho

@itkovian
Copy link
Member Author

itkovian commented Nov 9, 2017

There is nothing wrong with code reuse, under the correct license, no?

@JensTimmerman
Copy link
Contributor

right, link had to be https://bugs.python.org/issue21145 (reached that from the blog's going forward section )

@itkovian
Copy link
Member Author

More decorators should be used.

@itkovian itkovian self-assigned this Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants