Skip to content

Commit 3f95a88

Browse files
committed
updated: F.cache.add()/F.cache.set()
1 parent 81f16f9 commit 3f95a88

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

changes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ source-code: "tabs" instead of "spaces"
5353
- updated: translation @(#KEY) (direct reading) or @(TEXT TO TRANSLATE) (hash reading)
5454
- updated: Utils.request(), Utils.download() supports `dnscache` flag for caching host IP
5555
- updated: SchemaBuilderEntity.validation()
56+
- updated: F.cache.set(key, value, expire, [sync])
5657

5758
- fixed: F.usage() --> fixed queue pendings
5859
- fixed: (CRITICAL) SchemaBuilderEntity preparing (problem with prototypes)

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7042,7 +7042,7 @@ FrameworkCache.prototype.recycle = function() {
70427042
@expire {Date}
70437043
return @value
70447044
*/
7045-
FrameworkCache.prototype.add = function(name, value, expire) {
7045+
FrameworkCache.prototype.add = function(name, value, expire, sync) {
70467046
var self = this;
70477047
var type = typeof(expire);
70487048

@@ -7057,13 +7057,13 @@ FrameworkCache.prototype.add = function(name, value, expire) {
70577057
}
70587058

70597059
self.items[name] = { value: value, expire: expire };
7060-
framework.emit('cache-set', name, value, expire);
7060+
framework.emit('cache-set', name, value, expire, sync);
70617061

70627062
return value;
70637063
};
70647064

7065-
FrameworkCache.prototype.set = function(name, value, expire) {
7066-
return this.add(name, value, expire);
7065+
FrameworkCache.prototype.set = function(name, value, expire, sync) {
7066+
return this.add(name, value, expire, sync);
70677067
};
70687068

70697069
/**

0 commit comments

Comments
 (0)