-
Database Layer
Vanilla only supports MySQL. It has a generic SQL driver implementation built on top of PDO to potentially allow for other databases (which you can see in /library/databases). However, at this time, the Vanilla team has no plans to support additional databases. The best way to access the database is via existing models.…
-
Datasets
The Gdn_Dataset object is a way to store data. Most of the time, this data is the result of a query to the database. When you use our database object (as you always should) to execute a database select query, it will return a dataset. Here are a few commonly used methods you’ll want to know about: count() returns the…
-
Models, Forms, & Validation
The theory of a Model in MVC is that it is an object representation of the data being manipulated. In Garden, however, the actual object representation of the data comes from the DataSet class in the form of a php stdClass. So, as you may have guessed already, in Garden the model isn’t a representation of the data. In…
-
Caching with Memcached
Vanilla makes very heavy use of memcached for efficient performance and rendering. Configuring Memcached // Some specific resources (pre-dependency injection) look to see if caching is enabled. // Others don't care and will just use the configured cache. // An example would be write-buffering of discussions reads. // When…