1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Mass_parse: Clear ns_loaded cache; Add different cache clearing methods

This commit is contained in:
gnosygnu
2017-01-07 10:57:41 -05:00
parent 5840ebe592
commit ad646efb5c
11 changed files with 38 additions and 27 deletions

View File

@@ -125,7 +125,7 @@ class Lst_pfunc_lst_fxt {
public Lst_pfunc_lst_fxt Clear() {
if (fxt == null) fxt = new Xop_fxt();
fxt.Reset();
fxt.Wiki().Cache_mgr().Free_mem_all();
fxt.Wiki().Cache_mgr().Free_mem__all();
Io_mgr.Instance.InitEngine_mem();
return this;
}

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa.xtns.proofreadPage; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import org.junit.*; import gplx.xowa.apps.cfgs.*;
public class Pp_pages_nde_basic_tst {
private final Xop_fxt fxt = new Xop_fxt();
private final Xop_fxt fxt = new Xop_fxt();
@Before public void Init() {
Io_mgr.Instance.InitEngine_mem();
fxt.Wiki().Xtn_mgr().Xtn_proofread().Enabled_y_();
@@ -26,7 +26,7 @@ public class Pp_pages_nde_basic_tst {
fxt.Wiki().Ns_mgr().Add_new(Xowc_xtn_pages.Ns_page_id_default, "Page").Add_new(Xowc_xtn_pages.Ns_index_id_default, "Index").Init();
}
@After public void term() {
fxt.Wiki().Cache_mgr().Free_mem_all();
fxt.Wiki().Cache_mgr().Free_mem__all();
}
@Test public void Basic() {
fxt.Init_page_create("Page:A/1", "abc");

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa.xtns.proofreadPage; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import org.junit.*; import gplx.xowa.apps.cfgs.*;
public class Pp_pages_nde_index_tst {
private final Xop_fxt fxt = new Xop_fxt();
private final Xop_fxt fxt = new Xop_fxt();
@Before public void Init() {
Io_mgr.Instance.InitEngine_mem();
fxt.Wiki().Xtn_mgr().Xtn_proofread().Enabled_y_();
@@ -26,7 +26,7 @@ public class Pp_pages_nde_index_tst {
fxt.Wiki().Ns_mgr().Add_new(Xowc_xtn_pages.Ns_page_id_default, "Page").Add_new(Xowc_xtn_pages.Ns_index_id_default, "Index").Init();
}
@After public void term() {
fxt.Wiki().Cache_mgr().Free_mem_all();
fxt.Wiki().Cache_mgr().Free_mem__all();
}
@Test public void Repeated() { // PURPOSE: repeated pages should still show (and not be excluded by recursive logic); DATE:2014-01-01
fxt.Init_page_create("Page:A/1", "<pages index=\"A\" from=1 to=1 />abc"); // NOTE: recursive call to self
@@ -203,7 +203,7 @@ public class Pp_pages_nde_index_tst {
fxt.Init_page_create("Index:A", "");
// [[Index:]] has no [[Page:]] links; interpret to=1 as [[Page:A/1]]
fxt.Wiki().Cache_mgr().Free_mem_all();
fxt.Wiki().Cache_mgr().Free_mem__all();
fxt.Init_page_update("Index:A" , String_.Concat_lines_nl
( "no links"
));
@@ -213,7 +213,7 @@ public class Pp_pages_nde_index_tst {
));
// [[Index:]] has [[Page:]] links; interpret to=1 as 1st [[Page:]] in [[Index:]]'s [[Page:]] links
fxt.Wiki().Cache_mgr().Free_mem_all();
fxt.Wiki().Cache_mgr().Free_mem__all();
fxt.Init_page_update("Index:A" , String_.Concat_lines_nl
( "[[Page:A/0]]"
));
@@ -223,7 +223,7 @@ public class Pp_pages_nde_index_tst {
));
// [[Index:]] has [[Page:]] links but also <pagelist>; interpret to=1 as [[Page:A/1]]
fxt.Wiki().Cache_mgr().Free_mem_all();
fxt.Wiki().Cache_mgr().Free_mem__all();
fxt.Init_page_update("Index:A" , String_.Concat_lines_nl
( "[[Page:A/0]]"
, "<pagelist/>"

View File

@@ -21,7 +21,7 @@ public class Pp_pages_nde_recursion_tst {
private final Xop_fxt fxt = new Xop_fxt();
@Before public void Init() {fxt.Init_xtn_pages();}
@After public void term() {
fxt.Wiki().Cache_mgr().Free_mem_all();
fxt.Wiki().Cache_mgr().Free_mem__all();
}
@Test public void Page() { // PURPOSE: handle recursive calls on page; EX: fr.s:Page:NRF_19.djvu/19; DATE:2014-01-01
fxt.Init_page_create("Page:A/1", "<pages index=\"A\" from=1 to=1 />abc"); // NOTE: recursive call to self