docstr: return cached value for the given key.  If no value
  was yet cached or the value cannot be read, the specified
  default is returned.
  
  :param key: must be a ``/`` separated value. Usually the first
       name is the name of your plugin or your application.
  :param default: must be provided in case of a cache-miss or
       invalid cache values.
docstr_tok: ["return","cached","value","for","the","given","key",".","If","no","value","was","yet","cached","or","the","value","can","not","be","read",",","the","specified","default","is","returned",".",":","param","key",":","must","be","a","``","\/","``","separated","value",".","Usually","the","first","name","is","the","name","of","your","plugin","or","your","application",".",":","param","default",":","must","be","provided","in","case","of","a","cache-miss","or","invalid","cache","values","."]
code: def get(self, key, default):
      """return cached value for the given key.  If no value
      was yet cached or the value cannot be read, the specified
      default is returned.
  
      :param key: must be a ``/`` separated value. Usually the first
           name is the name of your plugin or your application.
      :param default: must be provided in case of a cache-miss or
           invalid cache values.
  
      """
      path = self._getvaluepath(key)
      try:
          with path.open("r") as f:
              return json.load(f)
      except (ValueError, IOError, OSError):
          return default
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import json
  import os
  from collections import OrderedDict
  import attr
  import py
  import six
  import pytest
  from .compat import _PY2
  from .pathlib import Path
  from .pathlib import resolve_from_str
  from .pathlib import rm_rf
label_desc: Use image node_id 6 for calling the Cache obj's underlying member method code with example usage: obj.get(key, default) and returns: json, default