Automattic / wp-memcached

Memcached Object Cache for WordPress.
https://wordpress.org/plugins/memcached/
GNU General Public License v2.0
159 stars 55 forks source link

Gather and display better stats() #53

Closed aidvu closed 4 years ago

aidvu commented 4 years ago

Update how we show the object-cache stats().

~Edit: Needs rebase after https://github.com/Automattic/wp-memcached/pull/52 is merged. Should be minor.~ Done.

aidvu commented 4 years ago

Still doing some updates.

aidvu commented 4 years ago

I think everything from code-review is dealt with.

Moved from custom functions to using WP native number/size formatting.

If you want to test how it looks with the debug-bar CSS changes:

+/* =========================================================================
+ *   Object cache styling
+ * ========================================================================= */
 #object-cache-stats h2 {
        border: none;
-       float: none;
+       float: left;
        text-align: left;
        font-size: 22px;
        margin-bottom: 0;
 }

+#object-cache-stats ul.debug-menu-links,
+#object-cache-stats-menu-targets {
+       clear: both;
+}
+
+.object-cache-stats-menu-target pre {
+       white-space: pre-wrap;
+       margin: 1rem 0;
+}
+
+#object-cache-stats ul.debug-menu-links li {
+       float: left;
+       margin: 0 10px 10px 0;
+       background: none;
+       border: 1px solid #eee;
+       color: #4b5259;
+       list-style: none;
+}
+
+#object-cache-stats ul.debug-menu-links li:hover {
+       border-color: #ddd;
+}
+
+#object-cache-stats ul.debug-menu-links li a {
+       background: none;
+       color: #4b5259;
+       overflow: hidden;
+       display: block;
+       padding: 5px 9px;
+       text-decoration: none;
+}
+