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

how to used the api #5

Closed
leeyisoft opened this issue Feb 16, 2015 · 2 comments
Closed

how to used the api #5

leeyisoft opened this issue Feb 16, 2015 · 2 comments

Comments

@leeyisoft
Copy link

run after ok, how to used the api?
I tried and failed :
3> simple_cache:insert(lee, "leeyi").
...
4> simple_cache:insert(lee, leeyi).
...
5> simple_cache:insert(lee, 33).
...
6> simple_cache:insert(lee, [leeyi,dd]).
...
9> simple_cache:insert('lee', 'dd').
** exception error: bad argument
in function ets:lookup/2
called as ets:lookup(sc_store,lee)
in call from sc_store:lookup/1 (src/sc_store.erl, line 17)
in call from simple_cache:insert/2 (src/simple_cache.erl, line 8)

@richcarl
Copy link
Member

It's hard to say from your examples, but something has probably crashed between line 6 and line 9, so that the ets table is no longer available. Can you repeat the failure?

@leeyisoft
Copy link
Author

I know the problem:
must be executed sc_stoce:init();

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