How should I store a static key pairs list? I wish to store around 200 static key value pairs.

A few ways i can think of, are the following: 

 - Using `variable_set()` 
 - Using a custom table
 - Using a cache 
 - Defining a constant in code
 - hard-coding the key pairs


The list will be referenced on every node. I am using the Views module as well.

How should I store the key pairs list in my case?
Regarding Using variable_get and variable_set


I would suggest storing them in variables tables using variable_set in serailized format.. Store your 200 pairs data in an array using variable_get function...

Variables are cached in cache_bootstrap table so that performance will be improved.


Regarding Custom Table


You will lose the cache ability and managing the rows like edit/insert will be a pain since you need to build logic to retrieve and update results.


Regarding Cache Table


It will be a temporary storage. If some one clears all cache you will lose the data.


Regarding Constant in Code


Yes.. You can use constants too..  I am not sure performance impact vs using variables.


Regarding Hardcoded in code


I believe it's same as using constants. But, If you are trying to hardcode everywhere then you will end up with redundant code which will result in update - data consistency problem.

If you think in Drupal way i will say variables is the way to go using variable_get and variable_set..