WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 5 years ago

#26096 closed defect (bug) (invalid)

Caching issue in get_calendar() function

Reported by: alexVauch Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.1
Component: Posts, Post Types Keywords: has-patch needs-testing
Focuses: template, performance Cc:

Description

Now the result of get_calendar() execution is cached. Including checking of user agent:

if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'camino') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'safari') !== false)

I suggest to cache only db queries.

Attachments (1)

Caching_only_db_queries.patch (8.0 KB) - added by alexVauch 8 years ago.
Caching only db queries.

Download all attachments as: .zip

Change History (8)

@alexVauch
8 years ago

Caching only db queries.

#1 follow-up: @johnbillion
8 years ago

Yuck! The user agent is being detected here in order to insert line breaks into the title attributes, but only in browsers that support it. We should kill that code instead of altering the caching.

#2 in reply to: ↑ 1 @alexVauch
8 years ago

Ok. But what about:
http://core.trac.wordpress.org/browser/tags/3.7.1/src/wp-includes/general-template.php#L1294
I think that cache will be cause of wrong "today" too.

#3 @SergeyBiryukov
8 years ago

  • Version changed from trunk to 2.1

Caching was introduced in [4522]. Browser detection was added in [521], altered in [752].

#4 @nacin
8 years ago

  • Component changed from Template to Posts, Post Types
  • Focuses template performance added

#5 @chriscct7
6 years ago

  • Keywords needs-testing added

This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.


5 years ago

#7 @peterwilsoncc
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Browser sniffing has since being removed from core.

Note: See TracTickets for help on using tickets.