Commit graph

14 commits

Author SHA1 Message Date
Aaron Schulz
3247bae0e7 Add action/user tracking to html cache purge jobs
Change-Id: Ic7155a7303debfaf26b13cb836497ccbc89ea238
2017-10-30 10:47:30 -07:00
Gilles Dubuc
b8292cef01 Make file purging also purge old versions
Also fixes purging for repos with sha1 thumb URLs.

Bug: T169198
Change-Id: Ibb98ecce83d690cc46769644038b54e37aea0b0d
2017-06-30 10:49:25 +02:00
Brad Jorsch
f4a306fb18 Deprecate "Avoid page_touched update for HTTP GET action=purge requests"
This reverts most of commit c84ba4d864.
The changes made there are no longer needed, and nothing in Gerrit seems
to have started using them since they were added.

The added constants in WikiPage, WikiPage::getLastPurgeTimestamp(), and
Article::getLastPurgeTimestamp() are deprecated, useless, and unused,
but not removed yet since they snuck into 1.28 so we can't revert them
without a deprecation period. Sigh.

Bug: T145649
Change-Id: I526fd4e004bee84c831a4cee71e44e92ee73480b
2017-03-27 10:10:26 -04:00
Aaron Schulz
e01fd44388 Move ResultWrapper subclasses to Rdbms
Change-Id: I6f3f0e85e268b24c57c537aa6ad8016e0b4cdddb
2017-03-03 00:44:41 +00:00
Kunal Mehta
6da7238c37 Make remote content skin tabs non-File specific
This is one of the steps for implementing shadow namespaces -
generalizing foreign file specific code to be usable for any namespace.
This allows us to no-longer special case WikiFilePage in SkinTemplate
when building content_navigation, and will let GlobalUserPage to add
similar tabs just by overriding the same functions.

The new WikiPage::getWikiDisplayName() and WikiPage::getSourceURL()
functions will return expected values for both local and remote content.

Change-Id: Ib3d7dcbefe95da351872e63f306799eef83e00a7
2016-12-06 23:32:21 +00:00
Aaron Schulz
f525c72590 Rename getSlaveDB() FileRepo method to getReplicaDB()
The old name is left as an alias.

Change-Id: I60ab2cd5ce05df4247d5e25b017d2debee56554e
2016-11-18 07:42:39 -08:00
Aaron Schulz
c84ba4d864 Avoid page_touched update for HTTP GET action=purge requests
This will still clear the local DC parser cache and the CDN cache
in all DCs. Therefore, the next page views served by the local
DC will reflect the refreshed content, as will further GET/HEAD
requests by the client that issued the purge using GET/HEAD.

If the problem was imply a stale CDN cache entry, then all
DCs will be up-to-date. If the problem is stale parser cache,
then a proper POST purge request is required to refresh all DCs.

Bug: T92357
Change-Id: I9af12ca8cfff73298f404fd3e2dd4f546621c546
2016-09-13 05:24:46 +00:00
Aaron Schulz
9120ee007a Remove upgradeRow() call from ?action=purge
This is overkill and can cause excess lock contention
on larger files. Purges are typically used to fix
thumbnails or CDN, not metadata. Scripts can always
be run to fix any real breakage.

Bug: T132921
Change-Id: Ieecf1c015735b7219ca51c87951b59c453cf588f
2016-05-04 10:56:23 -07:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Bartosz Dziewoński
6f9e6dd887 WikiFilePage: Remove weird useless comments
Change-Id: I0902ab6ddbfcec54f3385bdcdd5062503b5f1b95
2016-01-24 21:27:52 +01:00
Aaron Schulz
c6a4e7c131 Defer execution of HTMLCacheUpdate instances
None of these places need it to happen right now,
so for performance and consistent style, defer
them too.

Change-Id: Id0a2a352bfc04a783c3ebc54b059b241bb6a6f7e
2015-10-06 13:31:31 -07:00
umherirrender
4ee680a8b3 Fixed spacing
- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts

Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
2014-07-24 11:53:04 +02:00
withoutaname
0367d94952 Fold RevertFileAction class into RevertAction
RevertAction was simply a dummy class for outputting an error message
if the action was not done in the file namespace. I've instead
moved RevertFileAction to RevertAction and threw an exception
from within checkCanExecute().

Change-Id: I7b87de60680009bf4e74d33342cbe81cc0d211b5
2014-07-13 02:16:58 +00:00
withoutaname
32ac391331 Move implementations of Page to separate file
Moved implementations of the Page interface, including subclasses
of WikiPage and Article, to a separate /includes/page file.
Separated PoolWorkArticleView to the includes/poolcounter file.

Change-Id: I4557eab76e0cb12d9d7f93644c5831bdd5b472b0
2014-06-22 07:56:16 +00:00
Renamed from includes/WikiFilePage.php (Browse further)