Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

use clear() rather than flush()

  • Loading branch information...
commit 4de964f95fce8df6ab3c2cc83f8d8bb76b8075d0 1 parent 214acd4
Bradley Griffiths bradleyg authored

Showing 3 changed files with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +1 1  README.md
  2. +1 1  index.js
  3. +1 1  test.js
2  README.md
Source Rendered
@@ -46,7 +46,7 @@ which should print
46 46
47 47 * Deletes a key
48 48
49   -### flush = function()
  49 +### clear = function()
50 50
51 51 * Deletes all keys
52 52
2  index.js
@@ -21,7 +21,7 @@ exports.del = function(key) {
21 21 delete cache[key];
22 22 }
23 23
24   -exports.flush = function() {
  24 +exports.clear = function() {
25 25 cache = {};
26 26 }
27 27
2  test.js
@@ -5,7 +5,7 @@ cache.debug(false);
5 5
6 6 cache.put('a', true);
7 7 console.log('true == '+cache.get('a'));
8   -cache.flush();
  8 +cache.clear();
9 9 console.log('null == '+cache.get('a'));
10 10
11 11 console.log('null == '+cache.get('a'));

0 comments on commit 4de964f

Please sign in to comment.
Something went wrong with that request. Please try again.