Skip to content

pyres_cache is a module providing a convinient way to search/persist an iterable result.

Notifications You must be signed in to change notification settings

vls/pyres_cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyres_cache

pyres_cache is a module providing a convinient way to search/persist an iterable result.

Feature

  • Data persistence
  • Data in-memory caching
  • Indexing
  • Quering

Introduction

ResultCache is for generic iterable result. It supports single field indexing.

MySQLCache is specialized for MySQLdb result. And it use sqlite memory database for memory cache. So it supports almost full-featured SQL query and indexing.

Usage

Just place the source file into your source folder and import it!

Example

mysql_db = DataBase("localhost", "somedb", "root", "")
sql = "select *, b.id as bid from testtype as a left join jointable as b on a.id = b.id"
sqlite_db = SQLiteDB(':memory:')

name = "test"
sqlite_db.load(name, import_from_mysql(name, mysql_db, sql))

print sqlite_db.GetAll("select * from %s" % name)

About

pyres_cache is a module providing a convinient way to search/persist an iterable result.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages