Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install collective.purge-behaviors

How to install collective.purge_behaviors

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install collective.purge-behaviors
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.1.1 Available View build log
Linux (64-bit)
0.1.1 Available View build log
 
Author
License
BSD
Dependencies
Lastest release
version 0.1.1 on Aug 21st, 2013

A set of behaviors that are assignable to custom dexterity types for complex system setups. Assign the behavior to a specific type to have it purge parents, children, siblings, or site root each time it is edited. This is an advanced product, so please do not use unless you fully understand the implications of caching.

NOTE: The purge behaviors are additive. If you purge something that has a purge behavior on it, it will be triggered. If you are not careful, this could end in an infinite loop (e.g. purging parents on and item that purges siblings). There is no support to stop this use case at the moment. If someone wanted to add this, it would be very awesome of you. Otherwise, this will manifest as a max recursion error.

Usage

To use, add collective.purge_behaviors to the list of eggs in your plone site and then activate the behavior in the dexterity control panel for the type that should exhibit the purge behavior.

HINT: If these instructions don't make sense to you, you shouldn't be using this product.

Purge Behaviors

This package provides 4 different kinds of purge behaviors. They are all triggered when an item is edited, NOT when they are added for the first time.

Parents: When this item is edited, purge its parents, one level up. This calls the adapter for each parent so if the parents have the purge parent enabled as well, then it will keep going up the chain. This would be ideal for a situation where you have a folder view that you want to aggressively cache, and anytime you add a new item to the folder you want that cache to be cleared. Think: news items.

Siblings: When this item is edited, purge anything in the same folder as the item. If those items have purge behaviors as well, they will be persisted. This is ideal for a custom view that lists the contents of a parent folder in a portlet or something of that nature. Think: portlet and folder listings.

Contents: When this item is edited, purge anything it is containing. If that item is not folderish (that is, it implements IFolderish) then it will be bypassed for your safety. This is ideal for a custom view on the contents of a folder that rely on properties from the containing folder.

Site Root: When this item is edited, purge the site root. This is ideal for editing items that affect a front page display. For example, you add a custom donor type and there is a view on the front page that lists new donors. This will purge the plain views and the folder_listing of root. Changelog =========

0.2 (Unreleased)

0.1 (2013-08-12)

  • Initial release. [eleddy]

collective.purge_behaviors Copyright (c) 2012, eleddy All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright

System Message: ERROR/3 (<string>, line 67)

Unexpected indentation.
notice, this list of conditions and the following disclaimer.

System Message: WARNING/2 (<string>, line 68)

Block quote ends without a blank line; unexpected unindent.
  1. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  2. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

System Message: WARNING/2 (<string>, line 74); backlink

Inline literal start-string without end-string.

Subscribe to package updates

Last updated Aug 21st, 2013

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.