diff --git a/redfam.py b/redfam.py index e62b70d..0a23315 100644 --- a/redfam.py +++ b/redfam.py @@ -107,6 +107,13 @@ class RedFam: else: self._fam_hash = h.hexdigest() + @classmethod + def flush_db_cache( cls ): + """ + Calls flush method of Mysql Interface class + """ + MysqlRedFam.flush() + class RedFamParser( RedFam ): """ diff --git a/redpage.py b/redpage.py index 1ecd6e7..6a016bd 100644 --- a/redpage.py +++ b/redpage.py @@ -165,6 +165,7 @@ class RedPage: # Increment line counter i += 1 else: + RedFamParser.flush_db_cache() self._parsed = True def __update_db( self ): @@ -180,3 +181,10 @@ class RedPage: status = 0 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()