entitystore is not namespaced #128

Closed
ababich opened this Issue Apr 16, 2012 · 3 comments

Projects

None yet

4 participants

ababich commented Apr 16, 2012

Please, take a look at redis_metastore.rb vs redis_entitystore.rb in redis-rack-cache 1.2

in Metastore you have

  class Redis < RedisBase
    # The Redis instance used to communicated with the Redis daemon.
    attr_reader :cache

    def initialize(server, options = {})
      @cache = ::Redis::Factory.create(server)
    end

while in Entitystore

  class Redis < RedisBase
    def initialize(server, options = {})
      @cache = ::Redis.new server
    end

The difference in @cache initialization makes all entitystore entries non-namespaced which generates mess in Redis at all

If there is no other reason to initialize Entitystore through plain Redis.new, please fix this to make it namespaced

Contributor
mhoran commented May 24, 2012

I'll gladly merge a patch with tests. Otherwise, I'll try to get to this soon.

ababich commented May 24, 2012

Sorry, but I have no ability to push the proper patch in the closest time, will greatly appreciate if you'll be able to take a look on this

Contributor
jtblin commented Jul 20, 2012

Hi
I fixed the issue, added the tests and sent a pull request.

Thanks!
Jerome

@ccutrer ccutrer pushed a commit to ccutrer/redis-store that referenced this issue Feb 5, 2015
@jtblin jtblin Issue 128|fixing entitystore is not namespaced (redis-store#128) and …
…adding tests for both metastore and entitystore namespaces
839ed55
@tubbo tubbo closed this Dec 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment