View Issue Details

IDProjectCategoryView StatusLast Update
393PHPOF2Defaultpublic1 Nov 2011 21:18
Reportermrosenquist Assigned Totimj  
PrioritynormalSeverityfeatureReproducibilityN/A
Status acknowledgedResolutionopen 
Product Version0.12.2 
Summary393: Have a way to set LOB data to be stored in the FS but fallback to the db if the lob_storage_fs_path has not been defined
DescriptionWould be good to mark the tables which are likely to have a lot of data at the application level. If the data for the client becomes unmanageable the 'lob_storage_fs_path' can then be defined, without having to overload each model to achieve this.

Thinking of adding a extra constant "const LOB_STORAGE_FS_PREFERABLE = 'fspref';"

If you are happy with this change let me know and I'll create a patch
TagsNo tags attached.

Activities

timj

1 Nov 2011 21:11

manager   ~398

I definitely agree with the use case.
Not sure that the best way is making FS storage magically turn on according to whether the storage path is defined.

Couple of alternative ideas, feedback welcome:

1. Have a (globally-applicable) array-based option in PHPOF2_DB called "storage types enabled". Only the storage types listed would be available, otherwise it would fall back to DB storage. (at the moment it would basically be empty, or contain array(PHPOF2::LOB_STORAGE_FS))

2. Have a "storage type mappings" config option in PHPOF2_DB, which by default would be: array(PHPOF2::LOB_STORAGE_DB => PHPOF2::LOB_STORAGE_DB, ...) but could be changed to, for example, array(PHPOF2::LOB_STORAGE_FS => PHPOF2::LOB_STORAGE_DB) for the use case you described (so it would use DB storage instead of FS; when you are ready you would change the mapping so that FS storage is used for FS objects).

3. Have a configurable minimum object size for LOB_STORAGE_FS, so that objects that are smaller stay in the database (even if that table is set to use FS storage).

Issue History

Date Modified Username Field Change
26 Oct 2011 14:30 mrosenquist New Issue
1 Nov 2011 21:11 timj Note Added: 398
1 Nov 2011 21:18 timj Assigned To => timj
1 Nov 2011 21:18 timj Status new => acknowledged