null.js 796 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * Module dependencies.
  3. */
  4. var NullCache = module.exports = function() {};
  5. /**
  6. * Set cache item with given `key` to `value`.
  7. *
  8. * @param {String} key
  9. * @param {Object} value
  10. * @api private
  11. */
  12. NullCache.prototype.set = function(key, value) {};
  13. /**
  14. * Get cache item with given `key`.
  15. *
  16. * @param {String} key
  17. * @return {Object}
  18. * @api private
  19. */
  20. NullCache.prototype.get = function(key) {};
  21. /**
  22. * Check if cache has given `key`.
  23. *
  24. * @param {String} key
  25. * @return {Boolean}
  26. * @api private
  27. */
  28. NullCache.prototype.has = function(key) {
  29. return false;
  30. };
  31. /**
  32. * Generate key for the source `str` with `options`.
  33. *
  34. * @param {String} str
  35. * @param {Object} options
  36. * @return {String}
  37. * @api private
  38. */
  39. NullCache.prototype.key = function(str, options) {
  40. return '';
  41. };