RareData

Component ID

1373158

Component name

RareData

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Used to give other modules the place to store big amounts of data, needed for Drupal and the module rarely (for example for admin pages only or RPC rare requests).

Why? When?
On situations when there is no sence for module to create separate table to store only few records with large data hashes. Drupal variables don't fit this, because they are loaded every Drupal boot, and if you need some data only once in 4000 page loads it's not very logical to store it in Drupal variable. It's disscussed more in this topic and it forced me to write this simple module.

Features

  • Three simple function to use: raredata_load(), raredata_save(), raredata_delete()
  • Services 3 resource included to access raredata remotely (with permissions)
  • (in future) Allow items to have expires property to save

Usage example

//save data to DB
raredata_save('mymodule_settings', $data_hash);

//get data from DB
$settings_hash = raredata_load('mymodule_settings');