Development

#1846 (sfWebRequest: mime_type caching)

You must first sign up to be able to contribute.

Ticket #1846 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

sfWebRequest: mime_type caching

Reported by: Markus.Staab Assigned to: fabien
Priority: minor Milestone: 1.0.11
Component: other Version:
Keywords: sfWebRequest Cc:
Qualification: Unreviewed

Description

Hi,

in method getFileExtension of sfWebRequest class the mimetypes are read out every time you call the function.

$mimeTypes = unserialize(file_get_contents(sfConfig::get('sf_symfony_data_dir').'/data/mime_types.dat'));

why dont use a static var so you have to read the file only once?

Thanks, Markus

Change History

06/26/07 21:26:40 changed by Markus.Staab

  • version deleted.
  • milestone set to 1.0.6.

07/31/07 11:02:27 changed by fabien

  • milestone deleted.

12/27/07 17:25:30 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.
  • qualification set to Unreviewed.
  • milestone set to 1.0.11.

in r6768 and r6769