summaryrefslogtreecommitdiff
path: root/cherrypy/lib/caching.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Final fix for #662 (error on configuration directive ↵Robert Brewer2007-06-161-22/+19
| | | | tools.caching.delay/maxobjects/maxsize). Trunk (3.1) now forces most caching config to apply site-wide. Also changed MemoryCache.key to MemoryCache.key().
* Added 'must-revalidate' to Cache-Control header in expires tool.Robert Brewer2007-01-111-8/+9
|
* Fixed bug in caching; invalid methods did not delete cached resource. See #509.Robert Brewer2006-12-091-5/+15
|
* Tweaks to caching, mostly docs. Removed independent time.time() calculations ↵Robert Brewer2006-11-221-9/+25
| | | | in favor of response.time.
* Collapsed request.url and tree.url into a single cherrypy.url function.Robert Brewer2006-09-111-1/+1
|
* Improved tree.url() to include base. Also replaced request.browser_url with ↵Robert Brewer2006-09-061-2/+2
| | | | request.url().
* Reorganized the caching tool code.Robert Brewer2006-08-281-36/+8
|
* Tweaks to docs, line lengths, tests, and number of serving lookups.Robert Brewer2006-08-281-14/+18
|
* More (final?) config overhaul work:Robert Brewer2006-08-251-2/+2
| | | | | | | | | | 1. Removed cherrypy.config.get! Instead, you should directly inspect cherrypy.request, response, server, etc. Note that request.config.get still works fine. 2. a) cherrypy.log is now an instance of LogManager. It's still callable, but now is the object you inspect instead of calling config.get("log*"). b) cherrypy.log_access is now cherrypy.log.access. 3. All threads should now have access to default Request and Response objects, not just the main thread. 4. deadlock.timeout is now request.timeout. 5. Renamed config.py to _cpconfig.py; cherrypy.config is now an instance of _cpconfig.Config. I still need to decide what to do about log_config (removed for now).
* Lots of mixedCase to lower_with_underscores.Robert Brewer2006-08-121-36/+36
|
* WSGI-related changes:Robert Brewer2006-08-071-1/+1
| | | | | | | 1. Changed Request.run from request_line arg to deconstructed args: method, path, query_string, and protocol. 2. Moved HTTP protocol checking from _cprequest to _cpwsgiserver. What was cherrypy.response.version is now cherrypy.request.protocol (tuple form of SERVER_PROTOCOL). request.version and response.version attributes removed. _cpwsgiserver now writes out server.protocol, not SERVER_PROTOCOL (which is a misnomer, it really should have been REQUEST_PROTOCOL). 3. path unquoting was also moved from _cprequest to _cpwsgiserver (like most other WSGI servers). 4. New test for absoluteURI in the Request-Line.
* Eliminated 'default_content_type' config entry by moving ↵Robert Brewer2006-08-061-3/+6
| | | | tools.response_headers to on_start_resource. If anyone still needs response headers to be set late, they can call tools.response_headers later, either in code or via a hook declared in config.
* If not cacheable, we shouldn't even set Expires.Robert Brewer2006-08-031-16/+16
|
* Test and fix for bug in expires tool.Robert Brewer2006-07-251-1/+3
|
* More work on tools.expires:Robert Brewer2006-07-171-44/+29
| | | | | | | 1. Now takes 'secs' arg instead of 'e_time'. 2. The 'force' arg defaults to False now. 3. Set 'force' to True to imply ignore_indicators. 4. New cherrypy.reponse.time attribute: the time.time() which is used for the 'Date' response header.
* 1. New "expires" tool for setting the "Expires" header.Christian Wyglendowski2006-07-171-1/+50
| | | | 2. Tests for the expires tool.
* Caching tool invocation optimization.Robert Brewer2006-07-111-7/+8
|
* Fixed memory-leak bug when expiring cache objects.Robert Brewer2006-07-101-1/+2
|
* Fix for #538 (Caching must set Age response header). Also fixed a bad bug ↵Robert Brewer2006-07-061-4/+11
| | | | from using header_list instead of headers.
* caching: Turned MemoryCache.expirationQueue into "expirations", a dict. This ↵Robert Brewer2006-07-061-44/+34
| | | | solves some corner cases where a queued object with a long delay would prevent queued objects of shorter delays from expiring on time. It also removes the (variable-period) sleep call buried in Queue, and now uses a single 0.1 sec poll rate.
* Speedup of cache tool by caching the object only, not expirationTime or ↵Robert Brewer2006-07-051-12/+5
| | | | lastModified.
* Renamed lib.encodings to lib.encoding to avoid shadowing the builtin.Robert Brewer2006-06-271-2/+3
|
* Heavily cleaned the namespace for Tool objects:Robert Brewer2006-06-131-1/+1
| | | | | | | 1. Privatized "name", "point", "merged_args" and "setup". 2. Renamed Tool.enable to Tool.__call__. 3. Set the docstring of each Tool instance to the docstring of the tool's callable. Combined with the above, this means calltips should pick up the calltip of the callable. 4. Tools now copy the param names of self.callable to self.attributes. This allows users to "import tools" and then get config entry auto-completion in aware editors.
* Bah. Silly iteritems.Robert Brewer2006-06-121-1/+1
|
* Removed the wrap method from Tool, since the enable method should meet all ↵Robert Brewer2006-06-121-8/+9
| | | | cases better. Also fixed a bug where request.hooks was not being reinitialized on internalredirect. Also added code to guard against recursive internalredirects. Finally, fixed a couple of dict iterations that were missing iteritems.
* Fix for #509 (don't cache for POST, PUT, DELETE).Robert Brewer2006-06-081-2/+9
|
* Fix for #531 (Make an ETag tool). Also refactored If-Modified-Since validation.Robert Brewer2006-06-031-13/+12
|
* Dispatch and config lookup now happens as early as possible, once per ↵Robert Brewer2006-05-101-1/+1
| | | | request (unless InternalRedirect is raised). Also moved the logging code out of {{{_cputil}}} and into {{{__init__}}}. xmlrpc still needs fixed so it doesn't re-write path_info.
* Fix for #508 (Content-Type for 304s).Robert Brewer2006-05-021-1/+5
|
* Objects on the CP tree may now possess a _cp_config attribute, which ↵Robert Brewer2006-05-011-6/+7
| | | | replaces _cp_tools, _cp_on_error, and _cp_filters. The Request object now keeps its own 'config' attribute (recalculated whenever object_path changes) which mixes _cp_config settings with settings in cherrypy.config. Every tool now has a merged_args method, which is used to pass arguments to the wrapped callable.
* More tool improvements:Robert Brewer2006-04-261-1/+3
| | | | | | | 1. Replaced request.execute_main with request.dispatch. Setting request.dispatch to None means no dispatch call. 2. Better xmlrpc tool as a result. 3. Tools now know their own names. 4. Tools now mix config into args given to wrap() and handler().
* Fluff.Robert Brewer2006-04-221-15/+11
|
* Fixed the caching tool and test.Robert Brewer2006-04-221-2/+5
|
* CP 3 initial checkin. Global filters have been replaced by request.hooks. ↵Robert Brewer2006-04-211-0/+161
Lots of renaming and reorg of modules.