Memcached - Saving Custom Array I have the memcache module installed on Drupal 7. While it works fine I would like to implement some custom caching in some of my modules. For example, if I want to store the array:

$data = array('hi'=&gt;1,'bye'=&gt;2);


I can normally do the following:

$memcache_obj = memcache_connect('memcache_host', 11211);
memcache_set($memcache_obj, 'var_key', $data, 0, 30);


How can I do the equivalent in Drupal using the memcache module. I am trying to avoid having to declare the $memcache_obj each time and just use the one designated by the module.
With Drupal you are not supposed to manage the cache backend by yourself. Once memcached is set as your cache backend, you can just use the cache functions cache_set(), cache_get(), etc. and this data will go to cache.