Hi, I notice ActiveSupport::Cache implementations behave differently when
cache key is nil.
cache_key = nil
Rails.cache.write(cache_key, 'value')
Rails.cache.read(cache_key)
For example, FileStore raises a file system error No such file or
directory when calling write() with nil cache key.
From the table in your pull request, the MemCacheStore seems to be the one
I'd expect from all the options, i.e. writing or reading a nil key raises
ArgumentError: key cannot be blank.
Considering the docs even go as far as to say MemCacheStore is currently
the most popular cache store for
I understand where you're coming from,
and I completely disagree
false is blank, but it's not nil,
however, in some cases, falseness should not be validated
validates_presence_of :aggrees_with_contract* is correct, requires the
user to check the contract*
validates_presence_of
Should we enforce the no blank key behavior in each implementation,
or enforce it in the base class i.e. ActiveSupport::Cache?
On Tue, Jun 25, 2013 at 10:24 PM, T.J. Schuck t...@getharvest.com wrote:
From the table in your pull request, the MemCacheStore seems to be the one
I'd expect from all
Hey
On Tue, Jun 25, 2013 at 8:06 PM, James Pinto tap...@gmail.com wrote:
I understand where you're coming from,
and I completely disagree
false is blank, but it's not nil,
Well I think since it is a value, it should not be considered blank.
however, in some cases, falseness should not
Just read about the Casting gem:
https://discuss.gemnasium.com/t/casting-adding-behavior-to-objects-without-using-extend/34
https://github.com/saturnflyer/casting
What are the Rails core team's opinions about using Casting vs.
ActiveSupport::Concern usage, Rails delegation, etc.?
--
You
On Jun 25, 2013, at 7:36 AM, James Pinto wrote:
I understand where you're coming from,
and I completely disagree
false is blank, but it's not nil,
however, in some cases, falseness should not be validated
validates_presence_of :aggrees_with_contract is correct, requires the user
to
On Jun 25, 2013, at 9:54 AM, Gary Weaver wrote:
Just read about the Casting gem:
https://discuss.gemnasium.com/t/casting-adding-behavior-to-objects-without-using-extend/34
https://github.com/saturnflyer/casting
What are the Rails core team's opinions about using Casting vs.