For a caching mechanism for my Rails app I am setting a class variable in an instance method which is then later accessed in a class method. This works, but I'm a bit paranoid that there could be a memory leak. Therefore does anyone know if Rails @@class variables are cleared between requests? I have tried this out (on my local development environment), but you never know.
They dont get cleared if you have config.cache_classes = true, which is generally the case in production.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With