Commit Graph

16 Commits

Author SHA1 Message Date
FusionPBX
57b914d306 Update cache.lua
Make the cache.lua more robust in case of missing key or value.
2018-01-19 18:39:05 -07:00
Alexey Melnichuk
f308e2a30e Fix. Cache class. (#2755)
* Fix. Cache class.

 * `send_event` raise error so `Cache.del` did not remove key or send any event
 * use `memcache` method by default even if `cache` table does not defined in config
 * `Cache.get` did not return any data when use `memcache` method
 * `Cache.get` did not close file. (Its should not be a big problem because GC should do it by self).
 * `Cache.get` can returns some undefined global value. (if method is `file` and file not exists then method returns global `result` value)
 * `Cache.get` does not need check for file existence
 * Value escaping does not needed for `file` method
 * Needed different key escaping for `memcache` and `file` methods
 * Update self test

* Change. Use random names for temp files.
2017-07-26 09:40:53 -06:00
FusionPBX
4cba425e11 Update cache.lua 2017-07-22 15:18:20 -06:00
FusionPBX
5ddedc8afa Update cache.lua 2017-07-22 15:17:11 -06:00
FusionPBX
1804dcc344 Update cache.lua 2017-07-22 12:38:45 -06:00
FusionPBX
cf0fbb0f93 Update cache.lua 2017-07-22 01:09:39 -06:00
DigiDaz
57d2d955f3 Fixed scripts to get multiserver memcache working (#1795) 2016-08-04 11:40:36 -06:00
Alexey Melnichuk
d2ce44736a Fix. Lua can not generate non CUSTOM event with subclass. (#1756)
There 2 way.
First one generate `MEMCACHE` event without subclass
Second generate `CUSTOM` event with subclass e.g. `fusion::memcache`
2016-07-14 11:33:54 -06:00
mafoo
0eb7d5ddac WhitespaceClean-resources/install/scripts
whitespace pass over files
for reference regex that was used s/[ \t]+(\r?\n)/\1/
2016-03-11 13:21:52 +00:00
Alexey Melnichuk
05188ffd24 Fix. cache.support always returns false 2016-02-02 19:54:23 +03:00
Alexey Melnichuk
e769a0eafe Add. Lua part of fax_queue.
To poll active task you can run `luarun fax_queue_poll_once.lua`
2015-11-18 16:27:55 +03:00
Alexey Melnichuk
fb0aea39df Update comment. 2015-10-26 12:27:14 +03:00
Alexey Melnichuk
94240c769b Add. cache class emit MEMCACHE events. 2015-10-06 16:01:24 +04:00
Alexey Melnichuk
0c35f41e65 Fix. cache.del method.
Fix. cache.set returns boolean value.
Add. basic self_test
2015-09-15 18:02:46 +04:00
Alexey Melnichuk
59823f97dc Fix. Not found is treat as success for delete operation. 2015-09-09 16:52:52 +04:00
Alexey Melnichuk
029b806006 Add. Basic cache class
Fix. When memcache stopped and mod_memcache loaded dialplan did not build from DB.
2015-09-09 10:22:14 +04:00