Implement functions for flushing db query caches
This commit is contained in:
@@ -107,6 +107,13 @@ class RedFam:
|
|||||||
else:
|
else:
|
||||||
self._fam_hash = h.hexdigest()
|
self._fam_hash = h.hexdigest()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def flush_db_cache( cls ):
|
||||||
|
"""
|
||||||
|
Calls flush method of Mysql Interface class
|
||||||
|
"""
|
||||||
|
MysqlRedFam.flush()
|
||||||
|
|
||||||
|
|
||||||
class RedFamParser( RedFam ):
|
class RedFamParser( RedFam ):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ class RedPage:
|
|||||||
# Increment line counter
|
# Increment line counter
|
||||||
i += 1
|
i += 1
|
||||||
else:
|
else:
|
||||||
|
RedFamParser.flush_db_cache()
|
||||||
self._parsed = True
|
self._parsed = True
|
||||||
|
|
||||||
def __update_db( self ):
|
def __update_db( self ):
|
||||||
@@ -180,3 +181,10 @@ class RedPage:
|
|||||||
status = 0
|
status = 0
|
||||||
|
|
||||||
self.__mysql.update_page( self.page._revid, self.page.title(), status )
|
self.__mysql.update_page( self.page._revid, self.page.title(), status )
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def flush_db_cache( cls ):
|
||||||
|
"""
|
||||||
|
Calls flush method of Mysql Interface class
|
||||||
|
"""
|
||||||
|
MysqlRedPage.flush()
|
||||||
|
|||||||
Reference in New Issue
Block a user