Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 201115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:10:15+00:00 2026-05-11T17:10:15+00:00

(this is regarding the Ramaze.net framework) I ran into some really strange problems while

  • 0

(this is regarding the Ramaze.net framework)

I ran into some really strange problems while storing custom Objects
in session. I noticed that only the attributes on the objects
immediately stored in session were being updated. However, if those
objects contained references to other objects, those referenced
objects were not updated if the immediate objects contained in session
did not change during the request.

This problem only became apparent to me when using Ramaze::FileCache
as my session caching backend. I believe the problem is masked or not
an issue when using in-memory sessions.

I discovered the problem is because of a “shallow copy” in the session
logic found in Ramaze::Session::Hash#method_missing
(lib/ramaze/current/session/hash.rb).

As a quick test to make sure my thinking was correct, I commented out
the “difference check,” essentially forcing session to be updated
every time.

  def method_missing(*args, &block)
    old = @hash.dup
    result = @hash.send(*args, &block)
    #unless old == @hash
      Cache.sessions[@session.session_id] = self
    #end
    result
  end

This little hack fixed my problem. Now my questions are:

  1. is it a safe and reasonable solution?
  2. Should I just avoid storing complex/deep objects in session?
  3. Is there something I’m missing?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:10:15+00:00Added an answer on May 11, 2026 at 5:10 pm

    This issue has been solved in latest Ramaze (2009.04), please file a patch at the Ramaze issue tracker if the problem persists.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 144k
  • Answers 144k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can find a link to the Windows Driver Kit… May 12, 2026 at 8:34 am
  • Editorial Team
    Editorial Team added an answer I think you will be populating the datalist the first… May 12, 2026 at 8:34 am
  • Editorial Team
    Editorial Team added an answer The theoretical limit is really long but do you really… May 12, 2026 at 8:34 am

Related Questions

This is a question on how to best design the search experience for users
I'm digitally signing a XML document and verifying it on 2 different machines (Sign
Disclaimer: This is for a homework assignment, but the question is not regarding the
To trim the leading spaces we are using strmove. But we were advised to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.