Commits

Mike Bayer committed dd82a40

package reorg cont

Comments (0)

Files changed (4)

 the "stale" version of the resource remain available at this
 time while the new one is generated.
 
-Dogpile is at the core of the `dogpile.cache <http://bitbucket.org/zzzeek/dogpile.cache>`_ package
+dogpile.core is at the core of the `dogpile.cache <http://bitbucket.org/zzzeek/dogpile.cache>`_ package
 which provides for a basic cache API and sample backends based on the dogpile concept.
 
 Development Status
 -------------------
 
-Please note Dogpile is new and has only had minimal production usage !   Comments
+Please note dogpile.core is new and has only had minimal production usage !   Comments
 and improvements are welcome.  Since this is concurrency-oriented code, please review
 the source and let me know about potential issues.   As always, **use at your own risk!**
 

docs/build/api.rst

 API
 ===
 
-dogpile.core
-=============
+.. currentmodule:: dogpile.core
 
-.. automodule:: dogpile.core
+Dogpile
+=======
+
+.. autoclass:: Dogpile
+    :members:
+
+.. autoclass:: SyncReaderDogpile
+    :members:
+
+.. autoclass:: NeedRegenerationException
     :members:
 
 NameRegistry
 =============
 
-.. automodule:: dogpile.core.nameregistry
+.. autoclass:: NameRegistry
     :members:
 
 Utilities
 ==========
 
-.. automodule:: dogpile.core.readwrite_lock
+.. autoclass:: ReadWriteMutex
     :members:
 
 

docs/build/usage.rst

 
 .. _caching_decorator:
 
-Using Dogpile for Caching
-==========================
+Using dogpile.core for Caching
+===============================
 
-Dogpile is part of an effort to "break up" the Beaker
+dogpile.core is part of an effort to "break up" the Beaker
 package into smaller, simpler components (which also work better). Here, we
 illustrate how to approximate Beaker's "cache decoration"
 function, to decorate any function and store the value in
     def generate_my_expensive_value():
         return slow_database.lookup("stuff")
 
-The Dogpile lock will ensure that only one thread at a time performs ``slow_database.lookup()``,
+The :class:`.Dogpile` lock will ensure that only one thread at a time performs ``slow_database.lookup()``,
 and only every 3600 seconds, unless Memcached has removed the value in which case it will
 be called again as needed.
 
-In particular, Dogpile's system allows us to call the memcached get() function at most
+In particular, dogpile.core's system allows us to call the memcached get() function at most
 once per access, instead of Beaker's system which calls it twice, and doesn't make us call
 get() when we just created the value.
 
 .. _scaling_on_keys:
 
-Scaling Dogpile against Many Keys
-===================================
+Scaling dogpile.core against Many Keys
+=======================================
 
 The patterns so far have illustrated how to use a single, persistently held
 :class:`.Dogpile` object which maintains a thread-based lock for the lifespan

dogpile/core/__init__.py

 from dogpile import Dogpile, SyncReaderDogpile, NeedRegenerationException
+from nameregistry import NameRegistry
+from readwrite_lock import ReadWriteMutex
+
+__all__ = 'Dogpile', 'SyncReaderDogpile', 'NeedRegenerationException', 'NameRegistry', 'ReadWriteMutex'
 
 __version__ = '0.3.0'
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.