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

'v3.8.1.1'

This commit is contained in:
gnosygnu
2016-07-31 21:41:19 -04:00
parent 8e91ac0bc4
commit b0fdf78a41
388 changed files with 3517 additions and 2553 deletions

View File

@@ -34,7 +34,7 @@ public class Xow_page_cache {
else if (rv == null) {
Xoae_page page = wiki.Data_mgr().Load_page_by_ttl(ttl); // NOTE: do not call Db_mgr.Load_page; need to handle redirects
if (page.Db().Page().Exists()) {
rv = new Xow_page_cache_itm(page.Ttl(), page.Db().Text().Text_bry(), page.Redirect().Itms__get_at_0th_or_null());
rv = new Xow_page_cache_itm(page.Ttl(), page.Db().Text().Text_bry(), page.Redirect_trail().Itms__get_wtxt_at_0th_or_null());
synchronized (this) { // LOCK:high-usage;DATE:2016-07-14
cache.Add_bry_obj(ttl_full_db, rv);
}
@@ -55,8 +55,8 @@ public class Xow_page_cache {
else if (rv == null) {
Xoae_page page = wiki.Data_mgr().Load_page_by_ttl(ttl); // NOTE: do not call Db_mgr.Load_page; need to handle redirects
if ( page.Db().Page().Exists() // page exists
|| page.Redirect().Itms__len() > 0 ) { // page redirects to missing page; note that page.Missing == true and page.Redirected_src() != null; PAGE: en.w:Shah_Rukh_Khan; DATE:2016-05-02
rv = new Xow_page_cache_itm(page.Ttl(), page.Db().Text().Text_bry(), page.Redirect().Itms__get_at_0th_or_null());
|| page.Redirect_trail().Itms__len() > 0 ) { // page redirects to missing page; note that page.Missing == true and page.Redirected_src() != null; PAGE: en.w:Shah_Rukh_Khan; DATE:2016-05-02
rv = new Xow_page_cache_itm(page.Ttl(), page.Db().Text().Text_bry(), page.Redirect_trail().Itms__get_wtxt_at_0th_or_null());
synchronized (this) { // LOCK:high-usage;DATE:2016-07-14
cache.Add_bry_obj(ttl_full_db, rv);
}

View File

@@ -33,7 +33,8 @@ public class Xow_page_cache_itm implements Xowd_text_bry_owner {
public int Redirect_id() {return redirect_id;} private int redirect_id;
public void Set_text_bry_by_db(byte[] v) {this.wtxt__direct = v;}
public void Set_page_ids(int page_id, int redirect_id) {this.page_id = page_id; this.redirect_id = redirect_id;}
public void Set_redirect_bry(byte[] trg_wtxt) {
public void Set_redirect(Xoa_ttl ttl, byte[] trg_wtxt) {
this.ttl = ttl;
this.wtxt__redirect = wtxt__direct;
this.wtxt__direct = trg_wtxt;
}