Caching is an effective mechanism for reducing bandwidth usage and alleviating server load. However, the use of caching entails a compromise between content freshness and refresh cost. Constant refreshing allows a high degree of content freshness at a greater cost of system resource. Conversely, too little refreshing reduces content freshness but saves the cost of resource usage. To address the freshness-cost problem, we formulate the refresh scheduling problem with a generic cost model and use this cost model to determine an optimal refresh frequency that gives the best trade-off between refresh cost and content freshness. We prove the existence and uniqueness of an optimal refresh frequency under the assumptions that the arrival of updated content is Poisson and the age-related cost monotonically increases with decreasing freshness. In addition, we provide an analytic comparison of system performance under fixed refresh scheduling and random refresh scheduling, showing that two refresh schedulings with the same average refresh frequency are mathematically equivalent in terms of the long-run average cost.