Author: tziade Date: Tue Oct 4 12:20:08 2005 New Revision: 27915 Added: z3lab/memramcached/README.txt z3lab/memramcached/ZPL.txt Modified: z3lab/memramcached/browser/memramcachedview.py z3lab/memramcached/interfaces/__init__.py z3lab/memramcached/interfaces/memramcached.py z3lab/memramcached/memramcached.py z3lab/memramcached/memramcaching.py z3lab/memramcached/tests/test_memramcached.py Log: normalized headers and added README, and ZPL
Added: z3lab/memramcached/README.txt ============================================================================== --- (empty file) +++ z3lab/memramcached/README.txt Tue Oct 4 12:20:08 2005 @@ -0,0 +1,9 @@ +$Id:$ + +memramcached +============ + +This package is an intent to create a +ram cache based on distributed memcached server. + +It is in early stage at this time and should not be used yet. Added: z3lab/memramcached/ZPL.txt ============================================================================== --- (empty file) +++ z3lab/memramcached/ZPL.txt Tue Oct 4 12:20:08 2005 @@ -0,0 +1,54 @@ +Zope Public License (ZPL) Version 2.1 +------------------------------------- + +A copyright notice accompanies this license document that +identifies the copyright holders. + +This license has been certified as open source. It has also +been designated as GPL compatible by the Free Software +Foundation (FSF). + +Redistribution and use in source and binary forms, with or +without modification, are permitted provided that the +following conditions are met: + +1. Redistributions in source code must retain the + accompanying copyright notice, this list of conditions, + and the following disclaimer. + +2. Redistributions in binary form must reproduce the accompanying + copyright notice, this list of conditions, and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +3. Names of the copyright holders must not be used to + endorse or promote products derived from this software + without prior written permission from the copyright + holders. + +4. The right to distribute this software or to use it for + any purpose does not give you the right to use + Servicemarks (sm) or Trademarks (tm) of the copyright + holders. Use of them is covered by separate agreement + with the copyright holders. + +5. If any files are modified, you must cause the modified + files to carry prominent notices stating that you changed + the files and the date of any change. + +Disclaimer + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' + AND ANY EXPRESSED 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 COPYRIGHT HOLDERS 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. Modified: z3lab/memramcached/browser/memramcachedview.py ============================================================================== --- z3lab/memramcached/browser/memramcachedview.py (original) +++ z3lab/memramcached/browser/memramcachedview.py Tue Oct 4 12:20:08 2005 @@ -1,23 +1,19 @@ -#!/usr/bin/python +############################################################################## # -*- coding: ISO-8859-15 -*- -# (C) Copyright 2005 Nuxeo SARL <http://nuxeo.com> -# Author: Tarek Ziad� <[EMAIL PROTECTED]> +# Copyright (c) 2005 Nuxeo and Contributors. +# All Rights Reserved. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as published -# by the Free Software Foundation. +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -# -# $Id:$ +############################################################################## +""" + $Id:$ +""" __docformat__ = 'restructuredtext' from zope.app.publisher.browser import BrowserView Modified: z3lab/memramcached/interfaces/__init__.py ============================================================================== --- z3lab/memramcached/interfaces/__init__.py (original) +++ z3lab/memramcached/interfaces/__init__.py Tue Oct 4 12:20:08 2005 @@ -1,62 +1,2 @@ -############################################################################## # -# Copyright (c) 2002 Zope Corporation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""Interfaces for cache manager. - -$Id: __init__.py 27409 2004-09-02 07:05:38Z pruggera $ -""" -__docformat__ = 'restructuredtext' - -from zope.interface import Interface -from zope.schema import Choice - -class ICacheable(Interface): - """Object that can be associated with a cache manager.""" - - cacheId = Choice( - title=u"Cache Name", - description=u"The name of the cache used for this object.", - required=True, - vocabulary="Cache Names") - - def getCacheId(): - """Gets the associated cache manager ID.""" - - def setCacheId(id): - """Sets the associated cache manager ID.""" - - -class ICache(Interface): - """Interface for caches.""" - - def invalidate(ob, key=None): - """Invalidates cached entries that apply to the given object. - - `ob` is an object location. If `key` is specified, only - invalidates entry for the given key. Otherwise invalidates - all entries for the object. - """ - - def invalidateAll(): - """Invalidates all cached entries.""" - - def query(ob, key=None, default=None): - """Returns the cached data previously stored by `set()`. - - `ob` is the location of the content object being cached. `key` is - a mapping of keywords and values which should all be used to - select a cache entry. - """ - def set(data, ob, key=None): - """Stores the result of executing an operation.""" Modified: z3lab/memramcached/interfaces/memramcached.py ============================================================================== --- z3lab/memramcached/interfaces/memramcached.py (original) +++ z3lab/memramcached/interfaces/memramcached.py Tue Oct 4 12:20:08 2005 @@ -1,23 +1,19 @@ -#!/usr/bin/python +############################################################################## # -*- coding: ISO-8859-15 -*- -# (C) Copyright 2005 Nuxeo SARL <http://nuxeo.com> -# Author: Tarek Ziad� <[EMAIL PROTECTED]> +# Copyright (c) 2005 Nuxeo and Contributors. +# All Rights Reserved. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as published -# by the Free Software Foundation. +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -# -# $Id:$ +############################################################################## +""" + $Id:$ +""" __docformat__ = 'restructuredtext' from zope.app.cache.interfaces.ram import IRAMCache Modified: z3lab/memramcached/memramcached.py ============================================================================== --- z3lab/memramcached/memramcached.py (original) +++ z3lab/memramcached/memramcached.py Tue Oct 4 12:20:08 2005 @@ -1,27 +1,23 @@ -#!/usr/bin/python +############################################################################## # -*- coding: ISO-8859-15 -*- -# (C) Copyright 2005 Nuxeo SARL <http://nuxeo.com> -# Author: Tarek Ziad� <[EMAIL PROTECTED]> +# Copyright (c) 2005 Nuxeo and Contributors. +# All Rights Reserved. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as published -# by the Free Software Foundation. +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -# -# $Id:$ -__docformat__ = 'restructuredtext' +############################################################################## """ doc here +$Id:$ """ +__docformat__ = 'restructuredtext' + + import atexit from thread import allocate_lock Modified: z3lab/memramcached/memramcaching.py ============================================================================== --- z3lab/memramcached/memramcaching.py (original) +++ z3lab/memramcached/memramcaching.py Tue Oct 4 12:20:08 2005 @@ -1,25 +1,19 @@ -#!/usr/bin/python +############################################################################## # -*- coding: ISO-8859-15 -*- -# (C) Copyright 2005 Nuxeo SARL <http://nuxeo.com> -# Author: Tarek Ziad� <[EMAIL PROTECTED]> +# Copyright (c) 2005 Nuxeo and Contributors. +# All Rights Reserved. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as published -# by the Free Software Foundation. +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -# -# $Id:$ - +############################################################################## """Helpers for caching. + +$Id:$ """ __docformat__ = 'restructuredtext' Modified: z3lab/memramcached/tests/test_memramcached.py ============================================================================== --- z3lab/memramcached/tests/test_memramcached.py (original) +++ z3lab/memramcached/tests/test_memramcached.py Tue Oct 4 12:20:08 2005 @@ -1,23 +1,19 @@ -#!/usr/bin/python +############################################################################## # -*- coding: ISO-8859-15 -*- -# (C) Copyright 2005 Nuxeo SARL <http://nuxeo.com> -# Author: Tarek Ziad� <[EMAIL PROTECTED]> +# Copyright (c) 2005 Nuxeo and Contributors. +# All Rights Reserved. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as published -# by the Free Software Foundation. +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -# -# $Id:$ +############################################################################## +""" + $Id:$ +""" from time import time from unittest import TestCase, TestSuite, main, makeSuite -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins