Make WordPress Core

Opened 10 years ago

Closed 7 years ago

#26096 closed defect (bug) (invalid)

Caching issue in get_calendar() function

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


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 10 years ago.
Caching only db queries.

Download all attachments as: .zip

Change History (8)

10 years ago

Caching only db queries.

#1 follow-up: @johnbillion
10 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
10 years ago

Ok. But what about:
I think that cache will be cause of wrong "today" too.

#3 @SergeyBiryukov
10 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
10 years ago

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

#5 @chriscct7
8 years ago

  • Keywords needs-testing added

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

7 years ago

#7 @peterwilsoncc
7 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.