Implemented some enhancement request and fixed some bugs
Fixed #2 : Variables are not recognized when inside a rule token Fixed #15 : Rule: rete attributes are lost when a new ontology is created Fixed #14 : ReteNetwork: Format rules must not be added to Rete network Fixed #16 : DefConcept: Variables are not recognized when they are keyword arguments Fixed #4 : Comparison are not correctly set when comparison property is a concept Fixed #14 : Parser: merge FunctionParser.NamesNode and ExpressionParser.NamesNode Fixed #18 : Parser: Add SourceCodeNode test to UnrecognizedNodeParser Fixed #20 : At startup Number concept is saved in db a numerous number of time Fixed #21 : CacheManager: I can remove all elements from a ListIfNeededCache and fill it again Fixed #22 : CacheManager: I can remove all elements from a SetCache and fill it again Fixed #23 : HistoryManager: history() no longer works Fixed #24 : HistoryManager: history() no longer works after creating an exec rule Fixed #25 : SheerkaMemory: Use MemoryObject instead of sheerka.local Fixed #26 : Debugger: add the list all available services.. Fixed #27 : CONCEPTS_GRAMMARS_ENTRY does not seems to be in use any more Fixed #28 : Give order to services
This commit is contained in:
Vendored
+2
-2
@@ -15,7 +15,7 @@ class ListIfNeededCache(BaseCache):
|
||||
if isinstance(self._cache[key], list):
|
||||
self._cache[key].append(value)
|
||||
else:
|
||||
self._cache[key] = [self._cache[key], value]
|
||||
self._cache[key] = value if self._cache[key] is Removed else [self._cache[key], value]
|
||||
else:
|
||||
self._sync(key)
|
||||
|
||||
@@ -28,7 +28,7 @@ class ListIfNeededCache(BaseCache):
|
||||
if isinstance(self._cache[key], list):
|
||||
self._cache[key].append(value)
|
||||
else:
|
||||
self._cache[key] = [self._cache[key], value]
|
||||
self._cache[key] = value if self._cache[key] is Removed else [self._cache[key], value]
|
||||
else:
|
||||
self._cache[key] = value
|
||||
self._add_to_add(key)
|
||||
|
||||
Vendored
+9
-3
@@ -19,9 +19,12 @@ class SetCache(BaseCache):
|
||||
|
||||
def _put(self, key, value, alt_sdp):
|
||||
if key in self._cache:
|
||||
if value in self._cache[key]:
|
||||
if self._cache[key] is Removed:
|
||||
self._cache[key] = {value}
|
||||
elif value in self._cache[key]:
|
||||
return False
|
||||
self._cache[key].add(value)
|
||||
else:
|
||||
self._cache[key].add(value)
|
||||
else:
|
||||
self._sync(key)
|
||||
|
||||
@@ -31,7 +34,10 @@ class SetCache(BaseCache):
|
||||
self._cache[key] = sheerka_deepcopy(previous)
|
||||
|
||||
if key in self._cache:
|
||||
self._cache[key].add(value)
|
||||
if self._cache[key] == Removed:
|
||||
self._cache[key] = {value}
|
||||
else:
|
||||
self._cache[key].add(value)
|
||||
else:
|
||||
self._cache[key] = {value}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user