For pasta that has been cooked but not consumed immediately, the best way to preserve is the following:
1) Cool it by placing it under cold water from a running tap.
2) Then strain well, add a little olive oil and store in the fridge.
3) When you wish to use the pasta, heat through in a pot of boiling water.