Computing the spring constant of a single direction acting cylinder.

A spring constant has units of force/length so a hydraulic spring constant should have the same units.

The spring constant for one side of a hydraulic cylinder is β*A^2/V

Where:

β is the bulk modulus of oil and has units of force/area. This number is about 200,000 psi when things are ideal but is typically lower

A is the area of the piston being acted on.

V is the trapped volume of oil between the valve and the piston assuming there is no hose.

The units for β*A^2/V is force/length

If there is hose then the calculations get to be more difficult because there is little data about the hydraulic capacitance of most hoses.