1. In a cache having a plurality of ways, a method for selecting N ways available for replacement, comprising: providing a plurality of rulesets, wherein each one of the plurality of rulesets specifies N ways in the cache that are available for replacement, wherein N is an integer equal to or greater than zero; receiving an access address; using at least a portion of the access address to select a selected one of the plurality of rulesets; and using the selected one of the plurality of rulesets, selecting N ways in the cache that are available for replacement.