GraylinKim / sc2reader

A python library that extracts data from various Starcraft II resources to power tools and services for the SC2 community. Who doesn't want to hack on the games they play?
http://sc2reader.readthedocs.org
MIT License
413 stars 85 forks source link

s2gs parsing always hits battle.net #72

Closed dsjoerg closed 12 years ago

dsjoerg commented 12 years ago

The option to supply some kind of caching object would be important for large-scale usage.

GraylinKim commented 12 years ago

This is provided for in fc466d1b49d53bb13d5dc4753c126fa1989b7530 and d35ef33f6c4013c94d22bcecc19820380163daf1. These commits implement sub-resource loading from the parent factory, propagation of initial factory options, and Localization files as a factory resource.

780a9f226a3c50ebd08bc5e8794e2d99c5604bd0 exposes the following factory functions for override by subclasses:

The solution then is to use a subclass of the SC2Factory that implements your preferred caching solution.

GraylinKim commented 12 years ago

Closed based on success of my implementation for you.