Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No resetBucket() method listed in the README #49

Open
impressivewebs opened this issue Jun 23, 2015 · 4 comments
Open

No resetBucket() method listed in the README #49

impressivewebs opened this issue Jun 23, 2015 · 4 comments

Comments

@impressivewebs
Copy link

I notice that there is a resetBucket() method, but the README doesn't discuss it. Can this be added? On a related note, the README says the API exposes 5 methods, but it's actually 7 if you include the two bucket methods.

@impressivewebs impressivewebs changed the title No resetBucket() method listed in the README No resetBucket() method listed in the README Jun 23, 2015
@pamelafox
Copy link
Owner

Sure, can you send a pull request? I don't actually use lscache in any of my projects these days, so I haven't had an excuse to actively work on it. Thus, I love pull requests like that! :)

@impressivewebs
Copy link
Author

Ok, I'll see what I can do. Thanks.

@martianmartian
Copy link

A question, according to your note,

lscache.set('response', '...', 2);
lscache.setBucket('lib');
lscache.set('path', '...', 2);
lscache.flush();

then is everything after setBucket using 'lib'?

@martianmartian
Copy link

also, in your example

function initBuckets() {
  var bucket1 = [];
  for (var i = 0; i < CARDS_DATA.length; i++) {
    var datum = CARDS_DATA[i];
    bucket1.push({'id': datum.id, 'lastAsked': 0});
  }
  lscache.set(LS_BUCKET + 1, bucket1);
  lscache.set(LS_BUCKET + 2, []);
  lscache.set(LS_BUCKET + 3, []);
  lscache.set(LS_BUCKET + 4, []);
  lscache.set(LS_BUCKET + 5, []);
  lscache.set(LS_INIT, 'true')
}

is it good practice or unnecessary to use lscache.setBucket("something") ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants