PEATDB/zodbtest.py
def testMemory():
    """test memory behaviour of DB, how can cache be managed"""
    DB = PDatabase(server='localhost', username='farrell',
                         password='123', project='novo')
    #DB = PDatabase(local='large.fs')

    print DB
    db = DB.db
    print db.cacheSize()
    for k in DB.getRecs()[:50]:
        #print k
        r=DB[k]
        r.name
        if db.cacheSize()>500:
            db.cacheMinimize()

    print db.cacheSize()
    return
test memory behaviour of DB, how can cache be managed
test memory behaviour of DB, how can cache be managed
test memory behaviour of DB how can cache be managed
def testMemory():
    DB = PDatabase(server='localhost', username='farrell',
                         password='123', project='novo')
    print DB
    db = DB.db
    print db.cacheSize()
    for k in DB.getRecs()[:50]:
        r=DB[k]
        r.name
        if db.cacheSize()>500:
            db.cacheMinimize()
    print db.cacheSize()
    return
def testMemory ( ) : DB = PDatabase ( server = 'localhost' , username = 'farrell' , password = '123' , project = 'novo' ) print DB db = DB . db print db . cacheSize ( ) for k in DB . getRecs ( ) [ : 50 ] : r = DB [ k ] r . name if db . cacheSize ( ) > 500 : db . cacheMinimize ( ) print db . cacheSize ( ) return
test memory behaviour of DB, how can cache be managed
test memory behaviour of DB how can cache be managed
"""test memory behaviour of DB, how can cache be managed""" #DB = PDatabase(local='large.fs') #print k