{"action":"opened","issue":{"url":"https://api.github.com/repos/Automattic/vip-quickstart/issues/430","labels_url":"https://api.github.com/repos/Automattic/vip-quickstart/issues/430/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/vip-quickstart/issues/430/comments","events_url":"https://api.github.com/repos/Automattic/vip-quickstart/issues/430/events","html_url":"https://github.com/Automattic/vip-quickstart/issues/430","id":76493424,"number":430,"title":"Incorporate WordPress.com's specific approach to caching options","user":{"login":"westonruter","id":134745,"avatar_url":"https://avatars.githubusercontent.com/u/134745?v=3","gravatar_id":"","url":"https://api.github.com/users/westonruter","html_url":"https://github.com/westonruter","followers_url":"https://api.github.com/users/westonruter/followers","following_url":"https://api.github.com/users/westonruter/following{/other_user}","gists_url":"https://api.github.com/users/westonruter/gists{/gist_id}","starred_url":"https://api.github.com/users/westonruter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westonruter/subscriptions","organizations_url":"https://api.github.com/users/westonruter/orgs","repos_url":"https://api.github.com/users/westonruter/repos","events_url":"https://api.github.com/users/westonruter/events{/privacy}","received_events_url":"https://api.github.com/users/westonruter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-14T21:19:26Z","updated_at":"2015-05-14T21:19:26Z","closed_at":null,"body":"I've understood through Zendesk tickets that options are not cached in the same way on WordPress.com as they are in Core. Specifically, the `autoload` setting seems to be ignored on WordPress.com and all options are cached together in `alloptions` regardless. This is also hinted at from the [WP Large Options docs](https://vip.wordpress.com/plugins/wp-large-options/):\r\n\r\n> Be sure the sum of all data you store in options (get_option(), etc.) is less than 400 KB at most. Options are meant for settings and plugin options. If you need to store bigger HTML fragments, consider using a custom post type or the wp-large-options plugin.\r\n\r\nThis is a big problem on sites that make heavy use of widgets or which have a lot of scheduled tasks via WP Cron, as both widgets (`widget_{id_base}`) and WP Cron (`cron`) store their values in WP options. WordPress.com's specific handling of options should be added to Quickstart so we can adequately test this and be made aware of the problem earlier. \r\n\r\nAssuming I've understood the WordPress.com caching of options correctly, it seems the [`alloptions-limit`](https://github.com/Automattic/vip-quickstart/blob/master/www/wp-content/mu-plugins/alloptions-limit.php) mu-plugin could be changed to not filter `alloptions` to check if there are too many options stored, but to instead do an aggregate query like:\r\n\r\n```sql\r\nSELECT sum( length( option_name ) + length( option_value ) ) FROM wp_options;\r\n```\r\n\r\nThis would at least provide an alert to when the themes/plugins are going astray, even if the specific WordPress.com option-caching isn't implemented in Quickstart.\r\n\r\n----\r\n\r\nOh yeah, and using Redis instead of Memcached on WordPress.com would be nice :wink: "}}