Implement functions for flushing db query caches

This commit is contained in:
2015-09-17 20:00:13 +02:00
parent 8dc7fe678d
commit b1b37f9b9e
2 changed files with 15 additions and 0 deletions

View File

@@ -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 ):
""" """

View File

@@ -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()