Comments (4)
There is actually a cache built-in. But it only holds weak references, to not cause a memory leak.
2.1.2 :001 > x = Mustermann.new "/foo"
=> #<Mustermann::Sinatra:"/foo">
2.1.2 :002 > y = Mustermann.new "/foo"
=> #<Mustermann::Sinatra:"/foo">
2.1.2 :003 > x.object_id
=> 70336235790360
2.1.2 :004 > y.object_id
=> 70336235790360
2.1.2 :005 > x = y = nil
=> nil
2.1.2 :006 > GC.start
=> nil
2.1.2 :007 > x = Mustermann.new "/foo"
=> #<Mustermann::Sinatra:"/foo">
2.1.2 :008 > x.object_id
=> 70336230084880
from mustermann.
GREAT! Please update the documentation. I think this can be closed then...
from mustermann.
Hmm, doesn't work for me (My thing runs only half as fast). Either it is not working or the gc kicks in all the time :(
from mustermann.
Yeah, that might be. Which is why I'd rather not recommend relying on it.
What Ruby version are you on?
On Thu, Aug 14, 2014 at 5:01 PM, Daniel Mendler [email protected]
wrote:
Hmm, doesn't work for me (My thing runs only half as fast). Either it is
not working or the gc kicks in all the time :(—
Reply to this email directly or view it on GitHub
#32 (comment).
from mustermann.
Related Issues (20)
- undefined method `ruby2_keywords' with version 1.1.0
- Ruby 2.7 Deprecation Warnings HOT 1
- Mustermann is not compatible with JRuby --enable=frozen-string-literal param HOT 11
- Support Ruby 3.0 HOT 9
- Fix circular require with mustermann primary reference
- Ruby 3.2 compat of `Mustermann::Rails#expand` HOT 2
- Routers HOT 4
- Infinite loop handling regexps built with Regxp::EXTENDED HOT 12
- Expand hash and array HOT 4
- Shorthand Error Syntax HOT 2
- NameError: uninitialized constant Mustermann::VERSION when VERSION is already defined HOT 2
- Improve performance of `Mustermann.new` HOT 4
- Mustermann-1.0.1 HOT 3
- Jruby Support HOT 3
- Anchors HOT 5
- v1.0.3 HOT 1
- Expanding with unused empty array values HOT 4
- Fallback to Hash for Mustermann::EqualityMap produces warnings and seems incorrect HOT 3
- Use WeakRef instead of ObjectSpace::WeakMap? HOT 2
- Hash expansion needs removed from `**options` in call to `#pattern_from`. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mustermann.