Module js_cache

This module implements a basic cache.

Copyright © 2009-2010 Basho Technologies Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Behaviours: gen_server.

Authors: Kevin Smith (ksmith@basho.com).

Description

This module implements a basic cache. This cache is used to store files used to initialize each Javascript context. This is helpful because it prevents erlang_js from accessing the filesystem more than necessary.

Function Index

delete/1Deletes a key/value pair, if present, from the cache.
fetch/1Retrieves a key/value pair from the cache.
init/1
store/2Store a key/value pair.

Function Details

delete/1

delete(Key::any()) -> ok

Deletes a key/value pair, if present, from the cache.

fetch/1

fetch(Key::any()) -> any() | not_found

Retrieves a key/value pair from the cache. If the key is not in the cache, the atom 'not_found' is returned.

init/1

init(X1) -> any()

store/2

store(Key::any(), Value::any()) -> ok

Store a key/value pair


Generated by EDoc, Feb 26 2016, 11:10:13.