Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails.cache when running pry console #58

Open
doughsay opened this issue Sep 8, 2014 · 3 comments
Open

Rails.cache when running pry console #58

doughsay opened this issue Sep 8, 2014 · 3 comments

Comments

@doughsay
Copy link

doughsay commented Sep 8, 2014

After adding pry-rails to my project, Rails.cache no longer works in the console. Is this intentional?

This is what I get when using pry as my console:

(pry) main: 0> Rails.cache.write('foo', 'bar')
true
(pry) main: 0> Rails.cache.read('foo')
nil
@rf-
Copy link
Member

rf- commented Dec 31, 2014

Hi @doughsay, are you still having this issue?

@doughsay
Copy link
Author

doughsay commented Jan 5, 2015

Hi, yes, I am. I have been assuming that it's standard behavior... Performing the commands on the same line results in the cache being read from; but running them on separate lines results in the behavior listed above.

i.e.:

(pry) main: 0> Rails.cache.write('foo', 'bar'); Rails.cache.read('foo')
"bar"

@vavaka
Copy link

vavaka commented Jun 28, 2016

Hi @doughsay! I tried your use case in Pry 0.10.3 and did not hit the issue.

pry(main)> Rails.cache.write('foo', 'bar')
=> true
pry(main)> Rails.cache.read('foo')
=> "bar"

I guess that the issue has gone or it has not been at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants