Server Side Caching for Default Installation

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Server Side Caching for Default Installation

Jon Belanger
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

First time posting to the list, so sorry if I'm out of touch a bit.  I
did search through the documentation using the obvious keywords.

I'll lay out my problem...

I had MediaWiki at https://hostname.domain.edu/user/wiki

the LocalSettings.php reflected this path...

I then changed to

https://hostname.domain.edu/wiki

and changed LocalSettings.php to reflect this

Logging in anonymously the links in the wiki reflect the updated path,
but when I log in as a pre-existing user, they reflect the old path.  
This is odd, and I suspected caching immediately.  If I make any change
to a single page the new URL goes into the links for that page as it
should.

I did a little more exploring though, and found out a few odd things.

If I deleted the pre-existing user and simply logged in again as that
user (I'm using the LdapAuthentication.php module, so no need to
manually recreate, I can just log in with LDAP credentials and it'll
build the record in wiki.[wiki]_user for me.

When the LDAP user is created in the DB the user doesn't have all of
the "extra" preference values.  In this state all the pages reflect the
proper URL in the links when logged in as the newly re-created user.  
However, if I make a change to the preferences of the newly re-created
user (e.g. update real name, but could be any preference) then the URL
in all of the links break once more.  But, like I said, If I page a
change to single page, that page works, but the rest of the pages will
not.

So my questions are as follows:

#1 Why is caching on when I've set $wgCachePages = false

#2 Why the odd behavior with the "extra" preferences.  Why does it work
without then, and why does it break with then.   More to the point, why
does this effect server side caching?

Thanks,

Jon Belanger
Computer Systems Specialist
Departments of Chemistry, Biochemistry and Molecular Biology
University of Massachusetts Amherst
-----BEGIN PGP SIGNATURE-----

iD8DBQFEGZ2okcuAthB9NCYRAmSYAJ0Z5m0NVk6IUj9OugzwjfRWNqxVMQCfeTGY
tuwGzFqucGSOa+DOc3h0MAU=
=CWx1
-----END PGP SIGNATURE-----

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Server Side Caching for Default Installation

Jon Belanger
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I figured out the solution to my problem

TRUNCATE TABLE objectcache;

It would be nice for MediaWiki to truncate the table for you if you
change $wgCachePages from it's default to FALSE.  Or anyway, just have
$wgCachePages be false by default.

my $0.02

Some of my questions still stand, why do the preferences in the user
table effect wether or not to use the cache, I wonder??

Thanks,

On Mar 16, 2006, at 12:17 PM, Jon Belanger wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> First time posting to the list, so sorry if I'm out of touch a bit.  I
> did search through the documentation using the obvious keywords.
>
> I'll lay out my problem...
>
> I had MediaWiki at https://hostname.domain.edu/user/wiki
>
> the LocalSettings.php reflected this path...
>
> I then changed to
>
> https://hostname.domain.edu/wiki
>
> and changed LocalSettings.php to reflect this
>
> Logging in anonymously the links in the wiki reflect the updated path,
> but when I log in as a pre-existing user, they reflect the old path.
> This is odd, and I suspected caching immediately.  If I make any change
> to a single page the new URL goes into the links for that page as it
> should.
>
> I did a little more exploring though, and found out a few odd things.
>
> If I deleted the pre-existing user and simply logged in again as that
> user (I'm using the LdapAuthentication.php module, so no need to
> manually recreate, I can just log in with LDAP credentials and it'll
> build the record in wiki.[wiki]_user for me.
>
> When the LDAP user is created in the DB the user doesn't have all of
> the "extra" preference values.  In this state all the pages reflect the
> proper URL in the links when logged in as the newly re-created user.
> However, if I make a change to the preferences of the newly re-created
> user (e.g. update real name, but could be any preference) then the URL
> in all of the links break once more.  But, like I said, If I page a
> change to single page, that page works, but the rest of the pages will
> not.
>
> So my questions are as follows:
>
> #1 Why is caching on when I've set $wgCachePages = false
>
> #2 Why the odd behavior with the "extra" preferences.  Why does it work
> without then, and why does it break with then.   More to the point, why
> does this effect server side caching?
>
> Thanks,
>
> Jon Belanger
> Computer Systems Specialist
> Departments of Chemistry, Biochemistry and Molecular Biology
> University of Massachusetts Amherst
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFEGZ2okcuAthB9NCYRAmSYAJ0Z5m0NVk6IUj9OugzwjfRWNqxVMQCfeTGY
> tuwGzFqucGSOa+DOc3h0MAU=
> =CWx1
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
Jon Belanger
Computer Systems Specialist
Departments of Chemistry, Biochemistry and Molecular Biology
University of Massachusetts Amherst
-----BEGIN PGP SIGNATURE-----

iD8DBQFEGakAkcuAthB9NCYRAutPAJwPq+O/xP+JSGCqk41exqWO0gz6/QCgg0f8
iU4NfQSGVRORdI0y5r0zhHQ=
=86tV
-----END PGP SIGNATURE-----

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Server Side Caching for Default Installation

Brion Vibber
In reply to this post by Jon Belanger
Jon Belanger wrote:
> #1 Why is caching on when I've set $wgCachePages = false

That's only for client-side caching. The parser cache is separate.

> #2 Why the odd behavior with the "extra" preferences.  Why does it work
> without then, and why does it break with then.   More to the point, why
> does this effect server side caching?

Parser cache is keyed on various user options which affect rendering.

-- brion vibber (brion @ pobox.com)


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

signature.asc (257 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Server Side Caching for Default Installation

Brion Vibber
In reply to this post by Jon Belanger
Jon Belanger wrote:
> I figured out the solution to my problem
>
> TRUNCATE TABLE objectcache;
>
> It would be nice for MediaWiki to truncate the table for you if you
> change $wgCachePages from it's default to FALSE.  Or anyway, just have
> $wgCachePages be false by default.

As of MediaWiki 1.6 $wgCacheEpoch is updated along with the timestamp of your
LocalSettings.php on new installations. You can add this yourself if you expect
to constantly make such changes:

# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
$wgCacheEpoch = max( $wgCacheEpoch, $configdate );

> Some of my questions still stand, why do the preferences in the user
> table effect wether or not to use the cache, I wonder??

Generally they don't; they effect which cached copy you get.

-- brion vibber (brion @ pobox.com)


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

signature.asc (257 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Server Side Caching for Default Installation

Jon Belanger
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Mar 16, 2006, at 1:55 PM, Brion Vibber wrote:

>> It would be nice for MediaWiki to truncate the table for you if you
>> change $wgCachePages from it's default to FALSE.  Or anyway, just have
>> $wgCachePages be false by default.
>
> As of MediaWiki 1.6 $wgCacheEpoch is updated along with the timestamp
> of your
> LocalSettings.php on new installations. You can add this yourself if
> you expect
> to constantly make such changes:
>
> # When you make changes to this configuration file, this will make
> # sure that cached pages are cleared.
> $configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
> $wgCacheEpoch = max( $wgCacheEpoch, $configdate );
>
>> Some of my questions still stand, why do the preferences in the user
>> table effect wether or not to use the cache, I wonder??
>
> Generally they don't; they effect which cached copy you get.
>

>> #1 Why is caching on when I've set $wgCachePages = false
>
> That's only for client-side caching. The parser cache is separate.
>
>> #2 Why the odd behavior with the "extra" preferences.  Why does it
>> work
>> without then, and why does it break with then.   More to the point,
>> why
>> does this effect server side caching?
>
> Parser cache is keyed on various user options which affect rendering.

So, you've said that my problem here is the Parser cache.  Does
wgCacheEpoch effect the Parser cache?

Thanks,

Jon
-----BEGIN PGP SIGNATURE-----

iD8DBQFEGcCzkcuAthB9NCYRAvVwAKClIHYIKBytUVI712IZ627gBlgJbwCfX/u+
eRh/j8zyM7XU3FVUg0fTQ5Q=
=fr5w
-----END PGP SIGNATURE-----

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Server Side Caching for Default Installation

Brion Vibber
Jon Belanger wrote:
> So, you've said that my problem here is the Parser cache.  Does
> wgCacheEpoch effect the Parser cache?

Er, it does in 1.6. It *should* in 1.5 but I'm not 100% sure. That's old code
and may be buggy.

-- brion vibber (brion @ pobox.com)


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

signature.asc (257 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Size of the database

Armin Kniesel
Hello,

i am calculating the webspace for a webpage with wiki,
how much space do i need.
For example if there would be 1000 wikipages with
about 2kB text in it, so the
expected amount of webspace would be 2MB, right?
If every page is 10 times edited so the needed space
is 20MB, is this right?
Of course i have to calculate the uploaded images and
other files.

Can you tell me how much space do need your wikipages?

Armin



=============================================
[hidden email]
Propelleruhr: http://home.foni.net/~akniesel
=============================================


       

       
               
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Size of the database

M. Cameron Jones
On 3/16/06, Armin Kniesel <[hidden email]> wrote:
> Can you tell me how much space do need your wikipages?

Hi Armin -

According to the wiki statistics special page on one wiki I run
(http://gslis.org), there are 1,978 pages, 565 are 'legitimate content
pages'. With a total of 6,831 edits (avg of 3.45 edits per page).

The last time I backed up the database it was about 35 MB (not
including images and other uploaded matter). Which gives an average of
about 5KB per edit, or over twice the estimates you had to 2KB per
edit. Now, I don't think the average length of my wiki pages is 5K, so
I don't know where that number is coming from (possibly the rash of
spam edits and cleanings).

I hope this helps!
- Cameron
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Server Side Caching for Default Installation

Tim Starling
In reply to this post by Brion Vibber
Brion Vibber wrote:
> Jon Belanger wrote:
>
>>So, you've said that my problem here is the Parser cache.  Does
>>wgCacheEpoch effect the Parser cache?
>
>
> Er, it does in 1.6. It *should* in 1.5 but I'm not 100% sure. That's old code
> and may be buggy.

$wgCacheEpoch has invalidated the parser cache since 1.3beta2 (mid-2004). We've used that feature on
Wikimedia several times since then, for example during major upgrades.

-- Tim Starling

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Server Side Caching for Default Installation

Brion Vibber
Tim Starling wrote:

> Brion Vibber wrote:
>> Jon Belanger wrote:
>>> So, you've said that my problem here is the Parser cache.  Does
>>> wgCacheEpoch effect the Parser cache?
>>
>> Er, it does in 1.6. It *should* in 1.5 but I'm not 100% sure. That's old code
>> and may be buggy.
>
> $wgCacheEpoch has invalidated the parser cache since 1.3beta2 (mid-2004). We've used that feature on
> Wikimedia several times since then, for example during major upgrades.
Ah, now I remember what it was that didn't work: it was the client-side cache
that I had to fix it for.

-- brion vibber (brion @ pobox.com)


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

signature.asc (257 bytes) Download Attachment