Updated Cache class to match drupal 8.x functions.