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 3442952
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:43:56+00:00 2026-05-18T08:43:56+00:00

i want to Rails.cache a flickraw response (this is applicable to other un-dumpable structures

  • 0

i want to Rails.cache a flickraw response (this is applicable to other un-dumpable structures as well) with memcached as follows:

@flickr = Rails.cache.fetch('flickr_sets', :expires_in => 1) { flickr.photos.getRecent }

the obvious error is

TypeError: singleton can't be dumped

i read a good post on that problem by zilkey, who suggests building a new dump method for that case.

http://zilkey.com/2008/7/5/rails-cache-memcached-development-mode-and-offline-cache-invalidation

my questions are: what would be the right approach to cache that kind of objects? should i write my own dump method? wouldn’t it be possible to save the object in the cache with flickr.photos.getRecent.to_s as a String and then somehow reload it? any ideas?

  • 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-18T08:43:56+00:00Added an answer on May 18, 2026 at 8:43 am

    i asked your question on the github tracker, since i am also very interested in achieving this. ( see https://github.com/hanklords/flickraw/issues#issue/16 )

    hanklords seems to have fixed this in a current commit! great thing, i am trying to implement this in a current app of mine. can you maybe also test it, z3cko?
    https://github.com/hanklords/flickraw/commit/d09db4c5549e72b42eefbf1ea5c98f95bd1bd3d9

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

Sidebar

Related Questions

I have a class with this method: def telecom_info Rails.cache.fetch("telecom_info_for_#{ref_num}", :expires_in=> 3.hours) do info
I am creating a web-based IMAP client in Rails, and want to cache the
In rails I want to log some information in a different log file and
I have a site in rails and want to have site-wide settings. One part
I want to create my Rails application with MySQL, because I like it so
I want to create a Rails (2.1 and 2.2) model with ActiveRecord validations, but
I want to override the JSON MIME type (application/json) in Rails to (text/x-json). I
I want to use the Date::ABBR_MONTHS constant in my rails application. I see the
I want to log user's actions in my Ruby on Rails application. So far,
I want to point several domain names to the same Rails application. The content

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.