Size-dependent optical properties of large metal clusters are studied on the example of spherical sodium clusters. The model is based on the fact, that a sphere filled with free-electron gas forms a cavity with size dependent eigenfrequencies of the optically excitable TM plasmons. Therefore the dielectric function of the system gains the resonant character. The dielectric function defines the size-dependent indices of absorption and of refraction.