Skip to content

Commit 2aa491b

Browse files
stavpablohoffman
authored andcommitted
correct docs for default storage backend
1 parent bdf61c4 commit 2aa491b

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

docs/topics/downloader-middleware.rst

+14-12
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ single Python class that defines one or more of the following methods:
9696
.. method:: process_response(request, response, spider)
9797

9898
:meth:`process_response` should return a :class:`~scrapy.http.Response`
99-
object or raise a :exc:`~scrapy.exceptions.IgnoreRequest` exception.
99+
object or raise a :exc:`~scrapy.exceptions.IgnoreRequest` exception.
100100

101101
If it returns a :class:`~scrapy.http.Response` (it could be the same given
102102
response, or a brand-new one), that response will continue to be processed
@@ -131,7 +131,7 @@ single Python class that defines one or more of the following methods:
131131
kicks in, and won't bother calling any other exception middleware.
132132

133133
If it returns a :class:`~scrapy.http.Request` object, the returned request is
134-
used to instruct an immediate redirection.
134+
used to instruct an immediate redirection.
135135
The original request won't finish until the redirected
136136
request is completed. This stops the :meth:`process_exception`
137137
middleware the same as returning Response would do.
@@ -236,7 +236,7 @@ Here's an example of a log with :setting:`COOKIES_DEBUG` enabled::
236236
2011-04-06 14:49:50-0300 [diningcity] DEBUG: Crawled (200) <GET http://www.diningcity.com/netherlands/index.html> (referer: None)
237237
[...]
238238

239-
239+
240240
DefaultHeadersMiddleware
241241
------------------------
242242

@@ -256,7 +256,7 @@ DownloadTimeoutMiddleware
256256

257257
.. class:: DownloadTimeoutMiddleware
258258

259-
This middleware sets the download timeout for requests specified in the
259+
This middleware sets the download timeout for requests specified in the
260260
:setting:`DOWNLOAD_TIMEOUT` setting.
261261

262262
HttpAuthMiddleware
@@ -317,8 +317,8 @@ DBM storage backend (default)
317317

318318
.. versionadded:: 0.13
319319

320-
A DBM_ storage backend is also available for the HTTP cache middleware. To use
321-
it (instead of the default filesystem backend) set :setting:`HTTPCACHE_STORAGE`
320+
A DBM_ storage backend is available for the HTTP cache middleware. To use it
321+
(note: it is the default storage backend) set :setting:`HTTPCACHE_STORAGE`
322322
to ``scrapy.contrib.httpcache.DbmCacheStorage``.
323323

324324
By default, it uses the anydbm_ module, but you can change it with the
@@ -329,7 +329,9 @@ By default, it uses the anydbm_ module, but you can change it with the
329329
File system backend
330330
~~~~~~~~~~~~~~~~~~~
331331

332-
By default, the :class:`HttpCacheMiddleware` uses a file system storage with the following structure:
332+
A file system storage backend is also available for the HTTP cache middleware.
333+
To use it (instead of the default DBM_ storage backend) set :setting:`HTTPCACHE_STORAGE`
334+
to ``scrapy.contrib.downloadermiddleware.httpcache.FilesystemCacheStorage``.
333335

334336
Each request/response pair is stored in a different directory containing
335337
the following files:
@@ -414,7 +416,7 @@ HTTPCACHE_IGNORE_MISSING
414416

415417
Default: ``False``
416418

417-
If enabled, requests not found in the cache will be ignored instead of downloaded.
419+
If enabled, requests not found in the cache will be ignored instead of downloaded.
418420

419421
.. setting:: HTTPCACHE_IGNORE_SCHEMES
420422

@@ -432,7 +434,7 @@ Don't cache responses with these URI schemes.
432434
HTTPCACHE_STORAGE
433435
^^^^^^^^^^^^^^^^^
434436

435-
Default: ``'scrapy.contrib.downloadermiddleware.httpcache.FilesystemCacheStorage'``
437+
Default: ``'scrapy.contrib.httpcache.DbmCacheStorage'``
436438

437439
The class which implements the cache storage backend.
438440

@@ -455,7 +457,7 @@ HttpCompressionMiddleware
455457
.. module:: scrapy.contrib.downloadermiddleware.httpcompression
456458
:synopsis: Http Compression Middleware
457459

458-
.. class:: HttpCompressionMiddleware
460+
.. class:: HttpCompressionMiddleware
459461

460462
This middleware allows compressed (gzip, deflate) traffic to be
461463
sent/received from web sites.
@@ -466,7 +468,7 @@ ChunkedTransferMiddleware
466468
.. module:: scrapy.contrib.downloadermiddleware.chunked
467469
:synopsis: Chunked Transfer Middleware
468470

469-
.. class:: ChunkedTransferMiddleware
471+
.. class:: ChunkedTransferMiddleware
470472

471473
This middleware adds support for `chunked transfer encoding`_
472474

@@ -666,7 +668,7 @@ UserAgentMiddleware
666668
.. class:: UserAgentMiddleware
667669

668670
Middleware that allows spiders to override the default user agent.
669-
671+
670672
In order for a spider to override the default user agent, its `user_agent`
671673
attribute must be set.
672674

0 commit comments

Comments
 (0)