Download & Extend

Improved logic in memcache_admin

Project:Memcache API and Integration
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

There is unnecessary and redundant code in dmemcache_stats().

Also, if class_exists('Memcached') then there is no need to create menu entries for per-type statistics, since the Memcached extension does not support this.

Comments

#1

The attached patch:

  • Improves and simplifies the logic in dmemcache_stats() and memcache_admin_stats().
  • Skips erroneous menu entries in memcache_admin_menu() function.
  • Corrects two whitespace errors.
  • Corrects spelling error, "Memcahe" --> "Memcache"
  • Corrects grammar error, "statistic" --> "statistics"
AttachmentSize
memcached-logic_improvements-1099166-1.patch 5.15 KB

#2

Status:active» needs review

#3

Fixed typo in above patch and also one "else if" --> "elseif" correction in dmemcache_object() function.

AttachmentSize
memcached-logic_improvements-1099166-3.patch 5.43 KB

#4

Another redundancy removed -- no need to test for count($stats) one line before the foreach() that will skip if count = 0.

AttachmentSize
memcached-logic_improvements-1099166-4.patch 5.41 KB

#5

Bump.

nobody click here