cachedb_local Module


Table of Contents

1. Admin Guide
1.1. Overview
1.2. Dependencies
1.2.1. OpenSIPS Modules
1.2.2. External Libraries or Applications
1.3. Exported Parameters
1.3.1. cache_table_size (int)
1.3.2. exec_threshold (int)
1.3.3. cache_clean_period (int)
1.4. Exported Functions
1.4.1. cache_remove_chunk(glob)
1.5. Exported MI Functions
1.5.1. cache_remove_chunk
2. Contributors
2.1. By Commit Statistics
2.2. By Commit Activity
3. Documentation
3.1. Contributors

List of Tables

2.1. Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
2.2. Most recently active contributors(1) to this module

List of Examples

1.1. Set cache_table_size parameter
1.2. Set exec_threshold parameter
1.3. Set cache_clean_period parameter
1.4. cache_remove_chunk usage

Chapter 1. Admin Guide

1.1. Overview

This module is an implementation of a local cache system designed as a hash table. It uses the Key-Value interface exported by OpenSIPS core.

1.2. Dependencies

1.2.1. OpenSIPS Modules

None.

1.2.2. External Libraries or Applications

The following libraries or applications must be installed before running OpenSIPS with this module loaded:

  • none

1.3. Exported Parameters

1.3.1. cache_table_size (int)

The size of the hash table. This parameter will be used as the power of 2 when computing table size.

Default value is 9 (512).

Example 1.1. Set cache_table_size parameter

...
modparam("cachedb_local", "cache_table_size", 10)
...
	

1.3.2. exec_threshold (int)

The maximum number of microseconds that a local cache query can last. Anything above the threshold will trigger a warning message to the log

Default value is 0 ( unlimited - no warnings ).

Example 1.2. Set exec_threshold parameter

...
modparam("cachedb_local", "exec_threshold", 100000)
...
	

1.3.3. cache_clean_period (int)

The time interval in seconds at which to go through all the records and delete the expired ones.

Default value is 600 (10 minutes).

Example 1.3. Set cache_clean_period parameter

...
modparam("cachedb_local", "cache_clean_period", 1200)
...
	

1.4. Exported Functions

1.4.1.  cache_remove_chunk(glob)

Remove all keys from local cache that match the glob pattern

This function can be used from all routes

Example 1.4. cache_remove_chunk usage

	...
	cache_remove_chunk("myinfo_*");
	...
	

1.5. Exported MI Functions

1.5.1. cache_remove_chunk

Removes all local cache entries that match the provided glob param.

Parameters :

  • glob - keys that match glob will be removed

MI FIFO Command Format:

		:cache_remove_chunk:_reply_fifo_file_
		keyprefix*
		_empty_line_
		

Chapter 2. Contributors

2.1. By Commit Statistics

Table 2.1. Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)

 NameDevScoreCommitsLines ++Lines --
1. Vlad Paiu (@vladpaiu)33101155693
2. Bogdan-Andrei Iancu (@bogdan-iancu)14124046
3. Anca Vamanu12573954
4. Andrei Dragus104182181
5. Liviu Chircu (@liviuchircu)64749
6. Dusan Klinec3144
7. Razvan Crainea (@razvancrainea)3144
8. Ryan Bullock (@rrb3942)3124
9. Julián Moreno Patiño3111

(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)

(2) including any documentation-related commits, excluding merge commits. Regarding imported patches/code, we do our best to count the work on behalf of the proper owner, as per the "fix_authors" and "mod_renames" arrays in opensips/doc/build-contrib.sh. If you identify any patches/commits which do not get properly attributed to you, please submit a pull request which extends "fix_authors" and/or "mod_renames".

(3) ignoring whitespace edits, renamed files and auto-generated files

2.2. By Commit Activity

Table 2.2. Most recently active contributors(1) to this module

 NameCommit Activity
1. Bogdan-Andrei Iancu (@bogdan-iancu)Jan 2009 - Aug 2018
2. Liviu Chircu (@liviuchircu)Mar 2014 - Jun 2018
3. Julián Moreno PatiñoFeb 2016 - Feb 2016
4. Dusan KlinecDec 2015 - Dec 2015
5. Razvan Crainea (@razvancrainea)Aug 2015 - Aug 2015
6. Ryan Bullock (@rrb3942)Jan 2014 - Jan 2014
7. Vlad Paiu (@vladpaiu)Oct 2011 - Nov 2013
8. Andrei DragusJul 2009 - Jul 2009
9. Anca VamanuJan 2009 - Mar 2009

(1) including any documentation-related commits, excluding merge commits

Chapter 3. Documentation

3.1. Contributors

Last edited by: Bogdan-Andrei Iancu (@bogdan-iancu), Liviu Chircu (@liviuchircu), Vlad Paiu (@vladpaiu).

doc copyrights:

Copyright © 2009 Anca-Maria Vamanu