sasanrose / phpredmin

Yet another web interface for Redis
BSD 3-Clause "New" or "Revised" License
404 stars 96 forks source link

Remove useless columns from search results #49

Closed eugef closed 10 years ago

eugef commented 10 years ago

@sasanrose , i propose to remove columns "idle time" and "ref count" from search results as they are useless.

According to http://redis.io/commands/OBJECT

OBJECT IDLETIME returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).

In our case idle time will always be 0, because those key was just returned (read) by KEYS command.

OBJECT REFCOUNT returns the number of references of the value associated with the specified key. This command is mainly useful for debugging.

When accessing the object, the refcount is increased so that you cannot try to delete an object that is being accessed. By default, the refcount is 1 because one key refers to one value. It will quickly jump up to 2 and back down to 1 again during a GET, whilst the object is read. This means that if you issue a DEL on the object during the GET, you bring the refcount down to 1 instead of 0. Then, when the GET completes, the refcount decrements again and hits 0, and is successfully deleted.

The OBJECT REFCOUNT command is simply there to debug reference counting, to make sure refcounts are incremented and decremented properly across all paths of execution.

Again, ref count will be equal to 1 for all the keys in search result set.

As for me these two columns could be removed as they are useless. This also will save us 2 request to Redis per key.

If you agree with proposed changes i will implement them.

blitzmann commented 10 years ago

I agree, I don't see a reason for these.