The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Gotcha: Ruby Class Variable Scope is Global

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Max Zone

Posts: 9170
Nickname: dzone
Registered: Jun, 2006

dzone.com is a link-sharing community where member participation determines what gets published
Gotcha: Ruby Class Variable Scope is Global Posted: Nov 22, 2006 9:54 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Max Zone.
Original Post: Gotcha: Ruby Class Variable Scope is Global
Feed Title: dzone.com: ruby
Feed URL: http://feeds.dzone.com/dzone/ruby
Feed Description: dzone.com: fresh ruby and rails links for developers
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Max Zone
Latest Posts From dzone.com: ruby

Advertisement
While working on an application, I was using a class variable to cache access rights throughout the duration of a users session. I did not want to cache on a session variable, so was using a class variable. This technique worked nicely for a single web user and during testing, but failed miserably with two or more users.

Read: Gotcha: Ruby Class Variable Scope is Global

Topic: Rails on Glassfish Previous Topic   Next Topic Topic: First Time on The Rails Edge

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use