Best practices for implementing custom caching?
I can't think of a good reason why dropping the entries manually would cause a problem. This assumes, of course, that you're using MySQL as the backend for your particular cache; although I think the same applies to any other type of cache backend, the method to clear just wouldn't necessarily be a database query.

If you take the core update module as an example, it bypasses the cache_* functions and clears its cache manually:

function _update_cache_clear($cid = NULL, $wildcard = FALSE) {
  if (empty($cid)) {
    db_delete('cache_update')
      // Clear everything except fetch task information because these are used
      // to ensure that the fetch task queue items are not added multiple times.
      -&gt;condition('cid', 'fetch_task::%', 'NOT LIKE')
      -&gt;execute();
  }
  else {
    $query = db_delete('cache_update');
    if ($wildcard) {
      $query-&gt;condition('cid', $cid . '%', 'LIKE');
    }
    else {
      $query-&gt;condition('cid', $cid);
    }
    $query-&gt;execute();
  }
}


I always think "if it's good enough for core, it's good enough for me" :)