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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of TemplateCache #1926

Open
dentarg opened this issue Jun 13, 2023 · 3 comments
Open

Remove use of TemplateCache #1926

dentarg opened this issue Jun 13, 2023 · 3 comments

Comments

@dentarg
Copy link
Member

dentarg commented Jun 13, 2023

Here is a link to the code in Tilt: https://github.com/jeremyevans/tilt/blob/v2.1.0/lib/tilt.rb#L78-L117

Seeing these comments makes me want to remove it from Sinatra too 馃槄

Originally posted by @dentarg in #1922 (comment)

@dentarg
Copy link
Member Author

dentarg commented Jun 13, 2023

We have also this recent comment from jeremyevans/tilt#6 (comment) about it

The easiest upgrade path for other projects using Tilt::Cache, would be to copy the code from Tilt and use it, though projects should really switch to something better. I deprecated Tilt::Cache not just because Tilt didn't use it internally, but also because it is not thread safe and has other issues. See Tilt::Cache's documentation for why it may be a bad idea to use it: https://github.com/jeremyevans/tilt/blob/v2.3.0/lib/tilt.rb#L100-L108

@dentarg
Copy link
Member Author

dentarg commented Jun 13, 2023

@jeremyevans do you have any suggestion/idea what to replace it with? Something like RodaCache perhaps?

@jeremyevans
Copy link
Contributor

If you want the cache to be thread-safe (especially important on JRuby/TruffleRuby), then something like RodaCache with an added fetch method (made thread-safe) seems like the best approach.

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

2 participants