View Source SuperCache.Stack (SuperCache v0.6.1)
Stack module helps to easy to use stack data structure. This is global stack, any process can access to stack data. Can handle multiple stack with different name. Need to start SuperCache.start!/1 before using this module.
Ex:
alias SuperCache.Stack
SuperCache.start!()
Stack.push("my_stack", "Hello")
Stack.pop("my_stack")
# => "Hello"
Summary
Functions
Pop value from stack with name is stack_name. If stack_name is not existed or no data, it will return default value.
Add value to stack has name is stack_name. If stack_name is not existed, it will be created.
Functions
Pop value from stack with name is stack_name. If stack_name is not existed or no data, it will return default value.
Add value to stack has name is stack_name. If stack_name is not existed, it will be created.