dice-group / owlapy

OWLAPY is a Python Framework for creating and manipulating OWL Ontologies.
MIT License
21 stars 2 forks source link

Remove Caching #97

Closed Demirrr closed 2 weeks ago

Demirrr commented 2 weeks ago

We should not add any functionalities that cannot be disabled by the user. StructuralReasoner must be refactored!

alkidbaci commented 2 weeks ago

Caching can be disabled or enabled by the user. If you are referring to the automatic disable of caching when ontology modification is detected then that's something that is done to protect the user without him having to do the job manually because if axioms are added or removed from the ontology where the reason methods are called then in order to avoid inconsistencies with the information stored in cache we need to disable it.

Demirrr commented 2 weeks ago

Caching can be disabled or enabled by the user

These lines show that we cannot disable right ?! https://github.com/dice-group/owlapy/blob/56888c712eff55987d2523a0457ffc4a81a377a8/owlapy/owl_reasoner.py#L92C1-L111C15

alkidbaci commented 2 weeks ago

Okay there seems to be a misunderstanding, I thought we were talking about class and property cache. Its true that the LRU caches cannot be disabled, but since they are now gone #100 there is no cache left that cant be disabled.