| Version 1 (modified by vaibhav, 12 months ago) |
|---|
QDbBackedFormStateHandler
Type
Class
Located in includes/qcubed/_core/qform_state_handlers/QDbBackedFormStateHandler.class.php
Description
QDbBackedFormStateHandler is very similar to QFileFormStateHandler. The difference is that QDbBackedFormStateHandler uses one of the databases in configuration.inc.php for the work.
QDbBackedFormStateHandler is one of the ways to manage the FormStates in QCubed. When using QDbBackedFormStateHandler as the FormStateHandler, you get the FormStates stored in one of the databases. Please see coonfiguration.inc.php? for the settings.
This FormStateHandler saves and retrieves the FormStates from the selected table from the selected database instead of from the PHP Sessions (with QSessionFormStateHandler) or from the rendered page (with QFileFormStateHandler) or individual files. Since FormStates are saved into the database and the garbage collection is done periodically so that your DB stays healthy!
The good thing with QDbBackedFormStateHandler is that you read and save only the FormStates which are required, unlike PHP Sessions where all the FormStates are loaded on each page access. Also, this FormStateHandler is the one you want to use when you have more than one Web Servers serving your site. Also, unlike QFileFormStateHandler is does not create too many files on the server so the codebase is free from your FromStates? and you can focus on real work.
