title: Innodb memcached plugin in RDS not deleting expired rows
body: <p>I recently setup an RDS instance in AWS for MySQL 5.6 with the new Memcached InnoDB plugin. Everything works great and my app can store and retrieve cached items from the mapped table. When I store items I provide a timeout, and memcached correctly does not return the item once its TTL has expired. So far so good....</p>
  
  <p>However when I look at the underlying table, it is full of rows which have already expired. </p>
  
  <p>The MySQL documentation (<a href="http://dev.mysql.com/doc/refman/5.6/en/innodb-memcached-intro.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.6/en/innodb-memcached-intro.html</a>) indicates that item expiration has no effect when using the "<strong>innodb_only</strong>" caching policy (although it doesn't explicitly indicate which operation it is referring to). In any case my <code>cache_policies</code> table looks like this:</p>
  
  <pre><code>mysql&gt; select * from innodb_memcache.cache_policies;
  +--------------+------------+------------+---------------+--------------+
  | policy_name  | get_policy | set_policy | delete_policy | flush_policy |
  +--------------+------------+------------+---------------+--------------+
  | cache_policy | caching    | caching    | innodb_only   | innodb_only  | 
  +--------------+------------+------------+---------------+--------------+
  1 row in set (0.01 sec)
  </code></pre>
  
  <p>So, per the docs the expiration field should be respected.</p>
  
  <p>For reference my containers table looks like this:</p>
  
  <pre><code>mysql&gt; select * from innodb_memcache.containers;
  +---------+-----------+-----------+-------------+---------------+-------+------------+--------------------+------------------------+
  | name    | db_schema | db_table  | key_columns | value_columns | flags | cas_column | expire_time_column | unique_idx_name_on_key |
  +---------+-----------+-----------+-------------+---------------+-------+------------+--------------------+------------------------+
  | default | sessions  | userData  | sessionID   | data          | c3    | c4         | c5                 | PRIMARY                | 
  +---------+-----------+-----------+-------------+---------------+-------+------------+--------------------+------------------------+
  2 rows in set (0.00 sec)
  </code></pre>
  
  <p>And the data table is:</p>
  
  <pre><code>mysql&gt; desc sessions.userData;
  +-----------+---------------------+------+-----+---------+-------+
  | Field     | Type                | Null | Key | Default | Extra |
  +-----------+---------------------+------+-----+---------+-------+
  | sessionID | varchar(128)        | NO   | PRI | NULL    |       | 
  | data      | blob                | YES  |     | NULL    |       | 
  | c3        | int(11)             | YES  |     | NULL    |       | 
  | c4        | bigint(20) unsigned | YES  |     | NULL    |       | 
  | c5        | int(11)             | YES  |     | NULL    |       | 
  +-----------+---------------------+------+-----+---------+-------+
  5 rows in set (0.00 sec)
  </code></pre>
  
  <p>One more detail, the MySQL docs state that after modifying caching policies you need to re-install the Memcached plugin, but I did not find a way to do this on RDS, so I removed the Memcached option group, rebooted, added the memcached option group again, rebooted again... but there was no apparent change in behavior.</p>
  
  <p>So, to conclude, am I missing some step or configuration here? I would hate to have to create a separate process just to delete the expired rows from the table, since I was expecting the Memcached integration to do this for me.</p>