Consider how much it will cost to replace your bike when determining how much you can afford to spend in order to protect it. Another rule to consider is that if you do not buy a lock for your bike, chances are it will be stolen. And, if you do not buy a high quality lock, chances are it will still be stolen. A lightweight cable is vulnerable to cutting and does not provide adequate protection. Though very heavy, case hardened steel chain enclosed in a vinyl tube also works.
Solid steel is strongest, therefore the U-lock type generally offers better protection.
Consider combinations of two types of locks or even double U-locks for additional security. The proper placement of the lock is important. With a U-lock, position the device around the bike frame, wheels and post so that as much room as possible is filled up within the open portion of the lock. If the keyway is on the end of the crossbar, position the lock with the keyway facing downwards. For a bike with quick release wheels, consider completely removing the front wheel and securing it with the rear wheel and frame to the rack with the lock for best security.