The jcs:dampen() function is used to limit the number of times a function is called in succession when using a script. If a specific function exceeds the maximum number of calls within a specified amount of time, the jcs:dampen() function returns false. If a function does not exceed the maximum number of calls within a specified amount of time, the function returns true.
The function syntax is as follows:
var $rc jcs:dampen($tag, max, frequency);
Where:
The following example shows how the dampen() function can be used:
if (jcs:dampen('my-change', 3, 10)) {
/* Code to handle situations where the my-change function */
/* is called more than 3 times within 10 minutes */
} else {
/* Code to handle all other cases */